RubyGems
CVE-2026-126208
Loofah: SVG `<textPath>` and `<mpath>` bypass local-reference restriction
- Severity
- Medium 4.7
- Published
- 12 Nov 2026
- Last changed
- 12 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 2.25.3
- Exploit chance
- 0.4% in the next 30 daysHigher than 30% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · No login needed · Needs someone to click or open something
- Attacker can
- Read some data
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N- Also known as
- GHSA-345x-3rq2-jfrm
- Sources
- OSV.dev and GitHub
Description
Loofah restricts href and xlink:href on certain SVG elements to same-document references. Two elements escaped the restriction:
- : SVG_ALLOW_LOCAL_HREF listed it in lowercase as textpath, but the HTML5 parser names the element textPath inside , so the check never matched on the HTML5 path.
- : absent from SVG_ALLOW_LOCAL_HREF`, so its references were never restricted on either path.
rails-html-sanitizer reuses this safelist in its PermitScrubber, so it is affected too.
An external href or xlink:href on or survives sanitization. Firefox fetches the URL when rendering the content, which leaks the viewer's IP address, user agent, and referrer, and can reach hosts routable only from the viewer's network. Chrome and WebKit do not fetch external references on these elements. The impact is a network request to an attacker-chosen URL, not script execution.
Workarounds
Upgrade to Loofah >= 2.25.3.
Affected software
| Software | Affected versions |
|---|---|
loofahRubyGems · osv:RubyGems:loofah |
|
About loofah
- Total downloads (RubyGems)
- 780,664,962RubyGems, 24 Nov 2026
Vulnerabilities in loofah
- In our list
- 6
- Published in the last 12 months
- 6
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-126209Loofah allowed_uri? treats javascript: alert(1) as safeMedium 12 Nov 2026
- CVE-2026-126207Loofah: CSS url() sanitization bypass via escaped parenthesesMedium 4.7 12 Nov 2026
- CVE-2026-126205Loofah: Regular expression denial of service in the SVG local-reference checkMedium 5.3 12 Nov 2026
- CVE-2026-126206Loofah allowed_uri? treats data:text/html as safe text/plainMedium 12 Nov 2026
- CVE-2026-126203Loofah: Mutation XSS in the HTML5 scrubbers through unescaped attribute valuesMedium 6.1 12 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-126208
- GitHub Advisory Database https://github.com/advisories/GHSA-345x-3rq2-jfrm