Read the docs

Loofah lets SVG textPath and mpath elements fetch external URLs

Priority LOW 22CWE-178Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
Low · None · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.

Summary

Loofah, a Ruby library for manipulating HTML and XML, is affected before 2.25.3. Its SVG safelist misspells textPath and omits mpath, so external href and xlink:href values on those elements survive sanitization (CWE-184). A user who views the content in Firefox causes it to fetch the attacker-chosen URL, which can disclose the viewer's IP address and reach hosts on the viewer's network. Chrome and WebKit do not fetch these references.

Written with Claude Haiku 5.5 from the sources below · 2026-11-13

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00365 30th percentileScored 2026-11-16
Fix Fixed loofah (flavorjones): 2.25.3loofah (RubyGems): 2.25.3

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
flavorjonesloofahbefore 2.25.32.25.3Patch availableCNA
—loofah (RubyGems)before 2.25.32.25.3Patch availableGHSA-345x-3rq2-jfrm
  • loofah Vendorflavorjones Affected before 2.25.3 Fixed in 2.25.3 Patch available CNA
  • loofah (RubyGems) Vendor— Affected before 2.25.3 Fixed in 2.25.3 Patch available GHSA-345x-3rq2-jfrm

Remediation

Upgrade Loofah to version 2.25.3, the fixed version for the RubyGems package.

Written with Claude Haiku 5.5 from the sources below · 2026-11-13

  • Fix · CNA loofah (flavorjones) Fixed in 2.25.3
  • Fix · GHSA-345x-3rq2-jfrm loofah (RubyGems) Fixed in 2.25.3 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from CVE-2026-126208
  2. 2026-11-12 Alias added: GHSA-345x-3rq2-jfrm
  3. 2026-11-12 Fix available: RubyGems/[email protected] · GHSA-345x-3rq2-jfrm
  4. 2026-11-12 CVSS score added · GHSA-345x-3rq2-jfrm
  5. 2026-11-12 Weakness changed · GHSA-345x-3rq2-jfrm
  6. 2026-11-12 6 new references · GHSA-345x-3rq2-jfrm
  7. 2026-11-13 CISA SSVC decision points changed

References

  • TI-2022-07573 Inefficient Regular Expression Complexity in Loofah CVSS 3.1HIGH 7.5
  • TI-2022-07575 Uncontrolled Recursion in Loofah CVSS 3.1HIGH 7.5
  • TI-2018-05825 In the Loofah gem through 2.2.0 for Ruby, non-whitelisted HTML attributes may occur in… CVSS 3.0MEDIUM 6.1
  • TI-2026-91019 Cross-site scripting in Loofah URI validation via encoded data URIs CVSS 4.0MEDIUM 5.3
  • TI-2026-91016 Regular expression denial of service in Loofah SVG local-reference check CVSS 3.1MEDIUM 5.3
  • TI-2022-07577 Improper neutralization of data URIs allows XSS in rails-html-sanitizer CVSS 3.1MEDIUM 6.1
See all 15 →

Sources