MEDIUM · CVSS 3.1 4.7 EPSS 0.5% · 32th percentile CWE-178CWE-184

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

How to check your project

Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
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 vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionRequired
ScopeChanged
ConfidentialityLow
IntegrityNone
AvailabilityNone

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
## Summary Loofah restricts `href` and `xlink:href` on certain SVG elements to same-document references. Two elements escaped the restriction: - `<textPath>`: `SVG_ALLOW_LOCAL_HREF` listed it in lowercase as `textpath`, but the HTML5 parser names the element `textPath` inside `<svg>`, so the check never matched on the HTML5 path. - `<mpath>`: 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 `<textPath>` or `<mpath>` 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.

References

Source records: GHSA-345x-3rq2-jfrm (OSV.dev) · EPSS by FIRST, 2026-11-26.