Loofah `allowed_uri?` does not detect `javascript:` URIs split by named whitespace character references
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- High
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- Partial Red Hat: 2 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
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.
Why it matters now
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| flavorjones | loofah | 2.25.0 to before 2.25.2 | 2.25.2 | Patch available | CNA |
| — | loofah (RubyGems) | 2.25.0 to before 2.25.2 | 2.25.2 | Patch available | GHSA-8whx-365g-h9vv |
- loofah Vendorflavorjones Affected 2.25.0 to before 2.25.2 Fixed in 2.25.2 Patch available CNA
- loofah (RubyGems) Vendor— Affected 2.25.0 to before 2.25.2 Fixed in 2.25.2 Patch available GHSA-8whx-365g-h9vv
Remediation
- Fix · CNA loofah (flavorjones) Fixed in 2.25.2
- Fix · GHSA-8whx-365g-h9vv loofah (RubyGems) Fixed in 2.25.2 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat 3scale API Management Platform 2 | Affected | No fix planned: Out of support scope |
| Red Hat Satellite 6 | Affected | No fix yet: Fix deferred |
Not affected: 2 products
- Red Hat 3scale API Management Platform 2
- Red Hat Satellite 6
Timeline
- 2026-10-02 Threatist record created from CVE-2026-73491
- 2026-10-03 Alias added: GHSA-8whx-365g-h9vv
References
Other 5
- https://github.com/flavorjones/loofah/security/advisories/GHSA-8whx-365g-h9vv
- https://github.com/flavorjones/loofah/pull/308
- https://github.com/flavorjones/loofah/commit/5e91af861e3cdab47b91dd0b81f3afdfd13a5e19
- https://github.com/flavorjones/loofah/releases/tag/v2.25.2
- https://github.com/flavorjones/loofah
More flavorjones vulnerabilities
- 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-2022-07577 Improper neutralization of data URIs allows XSS in rails-html-sanitizer CVSS 3.1MEDIUM 6.1
- TI-2022-07574 Improper neutralization of data URIs may allow XSS in Loofah CVSS 3.1MEDIUM 6.1
- TI-2019-11687 Cross-site scripting in Loofah CVSS 3.1MEDIUM 5.4
Sources
- CVE-2026-73491 · CVE Program
- CVE-2026-73491 · NVD
- FIRST EPSS
- GHSA-8whx-365g-h9vv · GitHub Advisory Database · CC BY 4.0
- CVE-2026-73491 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences