Skip to content
Threat Brief

← All advisories

CVE-2026-126208

Medium 4.7No known exploitationFix available

Loofah: SVG `<textPath>` and `<mpath>` bypass local-reference restriction

Vendor advisory: GHSA-345x-3rq2-jfrm

Record last updated

CVSS score

4.7

Medium on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

0.4%

Higher than 31% of scored CVEs. A prediction, not evidence.

CISA remediation deadline

None

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

VendorProductAffected versionsFixed inPer
Microsoftazl4 rubygem-loofah 2.22.0-9.azl4 on Azure Linux 4.0Not documentedNot documentedMicrosoft MSRC
rubygemsloofahall versions before 2.25.32.25.3GitHub Advisory Database

Timeline

  1. Advisory

    Microsoft advisory published

    Source: Microsoft MSRC (opens in a new tab)

  2. Patch

    Fix documented by Microsoft MSRC

    Source: Microsoft MSRC (opens in a new tab)

Vendor guidance and references