CVE-2026-126209: Loofah allowed_uri? treats javascript: alert(1) as safe
Affects loofahSource GCVE Database
Not known to be exploited · CVSS 5.3 Medium : upgrade to 2.25.3 when convenient.
Data as of 12 Nov 2026, 22:38 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 4.0 | 5.3 |
|---|
- Patch
- Available – fixed in 2.25.3
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 12 Nov 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 12 Nov 2026.
What to do
Upgrade loofah to 2.25.3.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| RubyGemsloofah | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade Loofah to version 2.25.3 or later, where this issue is fixed. If upgrading is not immediately possible, avoid using allowed_uri? on HTML-encoded strings or ensure that input is properly decoded before validation. The default sanitize() method is not affected and can be used safely.
Description
Loofah's allowed_uri? method incorrectly treats certain HTML-encoded javascript: or vbscript: URIs as safe when the scheme is split by a numeric character reference without a trailing semicolon, followed by a whitespace character. This can cause browsers to interpret the URI as a script execution, potentially enabling cross-site scripting (XSS) if user-controlled URLs validated by allowed_uri? are rendered in browser-interpreted URI attributes. The default sanitize() method is not affected. The issue is fixed in Loofah version 2.25.3.
References
- github.com/flavorjones/loofah/security/advisories/GHSA-p9wj-w8xq-vjx6 (opens in a new tab)
- github.com/flavorjones/loofah/pull/324 (opens in a new tab)
- github.com/flavorjones/loofah/commit/62c04841e8252a1b5373afcd2b89fb9b8279e317 (opens in a new tab)
- github.com/flavorjones/loofah (opens in a new tab)
- github.com/flavorjones/loofah/releases/tag/v2.25.3 (opens in a new tab)
- github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/GHSA-p9wj-w8xq-vjx6.yml (opens in a new tab)