CVE-2026-73490
MediumCVSS 4.7Exploitation Probability (EPSS)
Low risk8th percentile - higher than 8% of all known CVEs
Summary
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Prior to 2.25.2, Loofah's HTML5 sanitizer applies its local-reference restriction only to the xlink:href attribute on SVG use and feImage elements, while browsers also accept the plain href attribute. A crafted sanitized SVG can therefore reference an arbitrary same-origin external document; use may render external SVG content containing scripts or other dangerous content, and feImage may load external images for tracking. Applications that sanitize user-supplied SVG with Loofah's default allowlist are affected. This issue is fixed in version 2.25.2.
Risk Assessment
An attacker could exploit this vulnerability to inject malicious content or track users, potentially leading to application security and user privacy breaches.
Recommendation
Update Loofah to version 2.25.2 or later. Review SVG sanitization practices and consider additional security measures.
Other vulnerabilities in Loofah
See all- GHSA-5qhf-9phg-95m2Low
Loofah::HTML5::Scrub.allowed_uri? does not correctly reject javascript: or vbscript: URIs when the scheme is split by a numeric character reference that has no trailing semicolon. A browser decodes such references and resolves the URL to an executable javascript: scheme, while allowed_uri? considers it safe.
- GHSA-9wjq-cp2p-hrgfMedium
Loofah's HTML5 sanitizer restricted only the xlink:href attribute on certain SVG elements to local, same-document references. Browsers also accept a plain href attribute as an alternative to the deprecated xlink:href per the SVG 2 spec, but Loofah did not apply the same restriction to it.
- GHSA-8whx-365g-h9vvLow
Loofah::HTML5::Scrub.allowed_uri? does not correctly reject javascript: URIs when the scheme is split or prefixed by the HTML5 named character references 	 (tab) or 
 (line feed). This is a bypass of the fix for GHSA-46fp-8f5p-pf2m, which handled the equivalent numeric character references.
- CVE-2026-126209Medium
Loofah from 2.25.0 until 2.25.3 has a flaw in allowed_uri? that strips whitespace and control characters before decoding a semicolon-less numeric character reference, hiding a javascript: or vbscript: scheme. An application rendering the approved value in a URI attribute can allow cross-site scripting.
- CVE-2026-126208Medium
Loofah prior to 2.25.3 has an SVG_ALLOW_LOCAL_HREF safelist that lists textPath with lowercase spelling not matching 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 rendering, disclosing the viewer's IP address, user agent, referrer, and access to hosts routable only from the viewer's network.
- CVE-2026-126207Medium
Loofah before 2.25.3 checks only the first parse of a style attribute, then rebuilds CSS with identifier escapes decoded, so escaped parentheses, property names, comments, or quotes can become a live url() without a second safety check. An attacker can use list-style or cursor to make a victim's browser request an attacker-chosen URL on render or hover.
- CVE-2026-126206Medium
In 2.25.2, Loofah::HTML5::Scrub.allowed_uri? treats a data URI mediatype containing the HTML5 named solidus reference / as malformed and falls back to the allowed text/plain, while a browser decodes the reference and interprets the same value as text/html. An application that validates a user-controlled URL with this helper and renders the approved value in href or another browser-interpreted URI attribute can allow cross-site scripting.
- CVE-2026-126205Medium
Before 2.25.3, the Loofah HTML5 sanitizer checks href and xlink:href on elements in SVG_ALLOW_LOCAL_HREF with a regular expression whose line anchor and newline-matching whitespace cause an all-whitespace value to be rescanned from every line start. An attacker can submit an SVG reference element with a long multiline-whitespace attribute and consume CPU quadratically during sanitization.
- CVE-2026-126203Medium
In Loofah from 2.21.0 to 2.25.3, the HTML5 APIs (Loofah.html5_fragment, Loofah.html5_document, scrub_html5_*) can emit sanitized output that a browser reparses as different markup when used with Nokogiri before 1.19.5 (which does not escape angle brackets in attribute values). MathML can place markup inside an allowed attribute, making the reparsed output live HTML; :strip is affected in all browsers, while :prune and :escape are affected in WebKit.
- CVE-2026-73492Low
Loofah from 2.25.0 until 2.25.2 does not reject javascript: or vbscript: URIs whose scheme is split by semicolon-less numeric character references such as :, 	, 
, or 
. CGI.unescapeHTML leaves these references encoded, so allowed_uri? reports the URL safe even though a browser decodes an encoded colon or strips encoded whitespace and executes the resulting URI scheme. This issue affects only callers that pass HTML-encoded strings directly to allowed_uri?; Loofah's default sanitize() path is not affected. This issue is fixed in version 2.25.2.
Original NVD description (English source)
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Prior to 2.25.2, Loofah's HTML5 sanitizer applies its local-reference restriction only to the xlink:href attribute on SVG use and feImage elements, while browsers also accept the plain href attribute. A crafted sanitized SVG can therefore reference an arbitrary same-origin external document; use may render external SVG content containing scripts or other dangerous content, and feImage may load external images for tracking. Applications that sanitize user-supplied SVG with Loofah's default allowlist are affected. This issue is fixed in version 2.25.2.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

