Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit URL with 	 in scheme
-
DeliveryPass HTML-encoded string to allowed_uri?
-
ExploitMethod approves javascript: URI (bypass)
-
ExecutionApplication renders URL into href attribute
-
PersistVictim clicks link, browser strips tab character
-
ImpactXSS executes in victim browser session
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
|
| Exploitation Conditions | Exploitation requires that the target application calls |
| Impact | The CVSS 4.0 score of 2.3 (AV:N/AC:H/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L) accurately captures the constrained attack surface: the vulnerability is network-reachable but requires high attack complexity because exploitation depends on a non-default application pattern - directly calling |
| Exploit ScenarioDerived | An attacker submits the URL |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 12, 2026
Cross-site scripting bypass in Loofah 2.25.0-2.25.1 allows attackers to smuggle javascript: URIs past the allowed_uri? helper by inserting HTML5 named whitespace character references (	 or 
) into the scheme. This is a partial bypass of the earlier fix for GHSA-46fp-8f5p-pf2m, which patched numeric character references but not named forms. Only callers that invoke allowed_uri? directly with HTML-encoded strings are vulnerable - including Action Text 8.2 markdown link validation - while Loofah's default sanitize() pipeline is explicitly unaffected. No public exploit identified at time of analysis; vendor-released patch in version 2.25.2.
RemediationAI
Upgrade to Loofah 2.25.2, which is the vendor-released patch resolving this issue. The tagged release is available at https://github.com/flavorjones/loofah/releases/tag/v2.25.2 and the fix commit is at https://github.com/flavorjones/loofah/commit/5e91af861e3cdab47b91dd0b81f3afdfd13a5e19. For applications unable to upgrade immediately, the most effective compensating control is to avoid passing raw HTML-encoded strings directly to Loofah::HTML5::Scrub.allowed_uri? - route URI validation through Loofah's standard sanitize() pipeline instead, which is confirmed unaffected because Nokogiri decodes entities during DOM parsing before allowed_uri? is ever invoked. Alternatively, pre-process the string with an HTML5-aware decoder (not CGI.unescapeHTML) before passing it to allowed_uri?. Applications using Action Text 8.2 should treat this as a priority upgrade given that feature's confirmed use of the affected code path.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in rubygems
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Loofah is a Ruby HTML/XML sanitization library (RubyGems: loofah, CPE: cpe:2.3:a:flavorjones:loofah:*:*:*:*:*:*:*:*) built on Nokogiri, heavily used in Rails applications. The root cause is CWE-184 (Incomplete List of Disallowed Inputs): allowed_uri? calls CGI.unescapeHTML to decode entities before checking for forbidden schemes, but CGI.unescapeHTML only handles numeric character references (e.g., 	) and leaves HTML5 named character references (	, 
) intact. The WHATWG URL parser implemented in all modern browsers strips U+0009 (tab) and U+000A (line feed) from URLs before scheme evaluation, so a payload like java	script:alert(1) is approved by allowed_uri? yet executed as javascript: by the browser. Only 	 and 
 are exploitable this way - decodes to U+00A0, which browsers do not strip. The fix in 2.25.2 adds an explicit WHITESPACE_CHARACTER_REFERENCES regex to strip these named references prior to scheme evaluation, alongside a new decode_numeric_character_references method for more complete numeric reference handling.
Know when Loofah gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
AC:H because exploitation requires non-default direct `allowed_uri?` usage with HTML-encoded input; PR:L for attacker URL submission access; S:C and C:L/I:L for downstream XSS browser impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. From 2.25.0 until 2.25.2, Loofah::HTML5::Scrub.allowed_uri? 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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
rails-html-sanitizer is responsible for sanitizing HTML fragments in Rails applications. Rated medium severity (CVSS 6.1
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri
In the Loofah gem through 2.2.0 for Ruby, non-whitelisted HTML attributes may occur in sanitized output by republishing
In the Loofah gem for Ruby through v2.3.0 unsanitized JavaScript may occur in sanitized output when a crafted SVG elemen
In the Loofah gem for Ruby, through v2.2.2, unsanitized JavaScript may occur in sanitized output when a crafted SVG elem
SVG href attribute bypass in Loofah prior to 2.25.2 allows a crafted sanitized SVG to reference arbitrary same-origin ex
Cross-site scripting in Loofah 2.25.0-2.25.1 is possible when applications call `Loofah::HTML5::Scrub.allowed_uri?` dire
EUVD-2026-57628
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB