Loofah: SVG `<textPath>` and `<mpath>` bypass local-reference restriction
CVE-2026-126208Published 12 Nov 2026, 20:59 UTC
Real-world risk
1.8/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
4.7
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Prior to 2.25.3, Loofah's SVG_ALLOW_LOCAL_HREF safelist lists textPath with lowercase spelling that does not match the HTML5 parser's element name and omits mpath, so external href and xlink:href values on those elements survive sanitization. Firefox fetches the attacker-chosen URL when a viewer renders the content, which can disclose the viewer's IP address, user agent, referrer, and access to hosts routable only from the viewer's network. Chrome and WebKit do not fetch these references, and the impact is a network request rather than script execution. The rails-html-sanitizer PermitScrubber reuses the affected safelist when SVG elements are permitted. This issue is fixed in version 2.25.3.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| loofahNiche | < 2.25.3 | 2.25.3 |
What to do
Update to a fixed version: 2.25.3.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.4% chance of exploitation in 30 days (percentile 32), as of 2026-12-05.
The arithmetic
- Prerequisites multiplied together0.700
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 0.7 × threat 0.851.785
- Rounded to one decimal between 0.1 and 101.8
Exploitation and evidence timeline
- 12 Nov 2026 Published
- 3 Dec 2026 Risk 1.8 (cvss fallback)
Weakness
CWE-178, CWE-184
References
- https://github.com/flavorjones/loofah/security/advisories/GHSA-345x-3rq2-jfrmvendor-advisory
- https://github.com/flavorjones/loofah/pull/324misc
- https://github.com/flavorjones/loofah/commit/cdd6ff7fb51998eb181bd2da925ddbcfcc8a3b96misc
- https://github.com/flavorjones/loofah/releases/tag/v2.25.3misc
- CVE-2026-126208 on CVE.org