CVE-2026-73491: Loofah ` URIs Split By Named Vulnerability
LOWCVE-2026-73491 is a LOW ` uris split by named vulnerability (CWE-184: Incomplete List of Disallowed Inputs) affecting Loofah libraries in the RubyGems ecosystem. The issue involves ` uris split by named whitespace character references. Remediation is available by upgrading affected packages to version 2.25.2.
CVE-2026-73491 at a Glance
How to Fix CVE-2026-73491
To remediate this vulnerability, upgrade all affected Loofah dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade loofah to 2.25.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for loofah
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-73491, inspect your project dependencies for Loofah:
inspect dependencies for loofah
Analyze the terminal output to locate any version of Loofah in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.25.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-184: Incomplete List of Disallowed Inputs, where the product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete. In Loofah, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-73491 Affected Loofah Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
loofah
|
RubyGems |
≥ 2.25.0
< 2.25.2
|
2.25.2
|
References
Frequently Asked Questions
What is CVE-2026-73491?
Which Loofah versions are affected?
What version fixes CVE-2026-73491?
Is loofah affected?
What CWE is associated with CVE-2026-73491?
How can I check RubyGems dependencies for CVE-2026-73491?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8whx-365g-h9vv",
"modified" : "2026-08-12T20:59:24Z",
"published" : "2026-07-21T15:04:14Z",
"aliases" : [ "CVE-2026-73491" ],
"summary" : "Loofah `allowed_uri?` does not detect `javascript:` URIs split by named whitespace character references",
"details" : "## Summary\n\n`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).\n\nThis is a bypass of the fix for [GHSA-46fp-8f5p-pf2m](https://github.com/flavorjones/loofah/security/advisories/GHSA-46fp-8f5p-pf2m), which handled the equivalent numeric character references (`	`, ` `, ` `) but did not cover the named forms.\n\n## Details\n\n`allowed_uri?` decodes HTML entities with `CGI.unescapeHTML`, which handles numeric character references but not HTML5 named character references. Payloads like `java	script:alert(1)` are therefore left intact, so the method does not recognize the `javascript:` scheme and returns `true`. A browser, however, decodes `	` and `
` to tab and line feed and strips them from the URL during parsing, producing `javascript:alert(1)`.\n\n`	` and `
` are the only relevant named character references: across the HTML5 named-character table, they are the only two that decode to characters the WHATWG URL parser strips from a URL (U+0009 and U+000A; there is no named reference for U+000D). ` ` / ` ` decode to U+00A0, which browsers do not strip, so they aren't usable for this bypass.\n\nNote that Loofah's default `sanitize()` path is **not** affected, because Nokogiri decodes or entity-escapes HTML entities during parsing before Loofah evaluates the URI protocol. This issue only affects callers of the public `allowed_uri?` string-level helper that pass it HTML-encoded strings.\n\n## Impact\n\nCallers that validate a user-controlled URL with `Loofah::HTML5::Scrub.allowed_uri?` and then render the approved value into an `href` or other browser-interpreted URI attribute may be vulnerable to cross-site scripting (XSS). This includes applications that call `allowed_uri?` directly, as well as higher-level features built on top of it, such as Action Text 8.2's markdown link validation.\n\n## Mitigation\n\nUpgrade to Loofah >= 2.25.2.\n\n## Credit\n\nResponsibly reported by GitHub user @connorshea.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "loofah"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.25.0"
}, {
"fixed" : "2.25.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/flavorjones/loofah/security/advisories/GHSA-8whx-365g-h9vv"
}, {
"type" : "WEB",
"url" : "https://github.com/flavorjones/loofah/commit/5e91af861e3cdab47b91dd0b81f3afdfd13a5e19"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/flavorjones/loofah"
}, {
"type" : "WEB",
"url" : "https://github.com/flavorjones/loofah/releases/tag/v2.25.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-184" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-21T15:04:14Z",
"nvd_published_at" : null
}
}