GHSA-8whx-365g-h9vv
LowSummary
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.
Risk Assessment
An attacker can bypass URI sanitization using named character references, enabling JavaScript injection and XSS attacks.
Recommendation
Update the Loofah library to a version that correctly rejects javascript: URIs with named character references.
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.
- 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.
- CVE-2026-73491Low
Loofah from 2.25.0 until 2.25.2 does not reject javascript: URIs whose scheme is split or prefixed with the HTML5 named whitespace character references 	 or 
. CGI.unescapeHTML leaves those references intact, so allowed_uri? reports the URL safe even though a browser decodes and strips the tab or line feed and executes the resulting javascript: URL. 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)
## Summary 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 chara
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

