All vulnerabilities

RubyGems

CVE-2026-126208

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

Severity
Medium 4.7
Published
12 Nov 2026
Last changed
12 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
2.25.3
Exploit chance
0.4% in the next 30 daysHigher than 30% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Case-sensitivity mistakes (CWE-178)Incomplete deny list (CWE-184)
Attack
Over the network · No login needed · Needs someone to click or open something
Attacker can
Read some data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
Also known as
GHSA-345x-3rq2-jfrm
Sources
OSV.dev and GitHub

Description

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.

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.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

Upgrade to Loofah >= 2.25.3.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
loofahRubyGems · osv:RubyGems:loofah
  • Every version before 2.25.3

About loofah

Total downloads (RubyGems)
780,664,962RubyGems, 24 Nov 2026

References