CVE-2026-126208
Medium 4.7No known exploitationFix availableLoofah: SVG `<textPath>` and `<mpath>` bypass local-reference restriction
Vendor advisory: GHSA-345x-3rq2-jfrm
Record last updated
CVSS score
Medium on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
Higher than 31% of scored CVEs. A prediction, not evidence.
CISA remediation deadline
Not in the KEV catalog
Description
## Summary 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. ## Impact 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. Applications that sanitize user-supplied SVG, directly or inside HTML, with Loofah's default allowlist or with `rails-html-sanitizer` with SVG elements permitted are affected. ## Mitigation Upgrade to Loofah >= 2.25.3.
Weakness: CWE-178, CWE-184
Patching and mitigation
- Patch status
- Fix available (source: Microsoft MSRC)
- Fix documented (source date)
- Mitigation
- None documented
- Vendor guidance
- msrc.microsoft.com (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| Microsoft | azl4 rubygem-loofah 2.22.0-9.azl4 on Azure Linux 4.0 | Not documented | Not documented | Microsoft MSRC |
| rubygems | loofah | all versions before 2.25.3 | 2.25.3 | GitHub Advisory Database |
Timeline
Advisory
Microsoft advisory published
Patch
Fix documented by Microsoft MSRC
Vendor guidance and references
- Microsoft Security Update Guide (opens in a new tab)vendor-advisory
- GitHub Advisory GHSA-345x-3rq2-jfrm (opens in a new tab)github-advisory