CVE-2026-126208: Loofah: SVG `<textPath>` and `<mpath>` bypass local-reference restriction
Published 2026-11-12 · Updated 2026-11-12 · Also known as GHSA-345x-3rq2-jfrm
Summary
The Loofah library fails to restrict href references on SVG <textPath> and <mpath> elements, allowing external network requests. Users sanitizing SVG content via Loofah or rails-html-sanitizer must upgrade to remediate this vulnerability.
Who is affected
Applications using Loofah or rails-html-sanitizer to process user-supplied SVG content are affected. By bypassing local-reference restrictions, an attacker can trigger unauthorized network requests to arbitrary URLs when the content is rendered in Firefox. This results in the leakage of viewer metadata such as IP address, user agent, and referrer.
Exploitability
The vulnerability carries a CVSS 3.1 score of 4.7, indicating a medium-severity issue that requires user interaction to exploit. With an EPSS score of 0.004, the exploit likelihood remains low, and it is not currently tracked as a CISA Known Exploited Vulnerability.
Remediation
- Upgrade the RubyGems loofah package to version 2.25.3 or later.
- Update rails-html-sanitizer if it is being used in your application, as it inherits the affected safelist.
How to check your project
- Check your Gemfile.lock for the current version of the 'loofah' gem.
- Audit application dependencies for 'rails-html-sanitizer' to verify if it relies on a vulnerable version of Loofah.
Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| RubyGems | loofah |
>= 0, < 2.25.3 | 2.25.3 | bundle update loofah |
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | Required |
| Scope | Changed |
| Confidentiality | Low |
| Integrity | None |
| Availability | None |
FAQ
Does this vulnerability allow for Remote Code Execution (RCE)?
No. The vulnerability is limited to triggering unauthorized network requests and does not allow for script execution.
Are all browsers affected by this issue?
No. Only Firefox is known to fetch these external references; Chrome and WebKit engines do not.
Is this a CISA Known Exploited Vulnerability?
No, it is not currently listed as a CISA KEV.
Original advisory description
References
- WEB https://github.com/flavorjones/loofah/security/advisories/GHSA-345x-3rq2-jfrm
- WEB https://github.com/flavorjones/loofah/pull/324
- WEB https://github.com/flavorjones/loofah/commit/cdd6ff7fb51998eb181bd2da925ddbcfcc8a3b96
- PACKAGE https://github.com/flavorjones/loofah
- WEB https://github.com/flavorjones/loofah/releases/tag/v2.25.3
- WEB https://github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/GHSA-345x-3rq2-jfrm.yml
Source records: GHSA-345x-3rq2-jfrm (OSV.dev) · EPSS by FIRST, 2026-11-26.