CVE-2026-126209 json
Loofah allowed_uri? treats javascript: alert(1) as safe
published 13d ago modified 2d ago also GHSA-p9wj-w8xq-vjx6 , EUVD-2026-124716
- cvss
- 5.3
- version 4.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 36%
- public exploits
- 0
- none known
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.3, Loofah::HTML5::Scrub.allowed_uri? strips whitespace and control characters before decoding a semicolon-less numeric character reference, changing where the reference ends and hiding a javascript: or vbscript: scheme that a browser reconstructs. The bypass applies to encoded colons and encoded scheme letters when a stripped character terminates the numeric reference. An application that renders the approved value in href or another browser-interpreted URI attribute can allow cross-site scripting, and Rails::HTML::Sanitizer.allowed_uri? re-exports the affected helper. Loofah's default sanitize() path is not affected because Nokogiri decodes entities before URI evaluation. This issue is fixed in version 2.25.3.
Patch / fix
- rubygems loofah 2.25.3
- github.com/flavorjones/loofah@62c0484 commit
- github.com/flavorjones/loofah#324 pull request
- github.com/flavorjones/loofah/releases/tag/v2.25.3 release
Is CVE-2026-126209 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
0.41% chance of exploitation in the next 30 days, higher than 36% of all scored CVEs (FIRST EPSS, 2026-11-14).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 5.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:N |
| CNA | 4.0 | 5.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:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | loofah | >=2.25.0, <2.25.3 |
2.25.3 |
Affected products
- flavorjones loofah
Classification
References
-
github.com
/flavorjones/loofah/pull/324
web
-
github.com
/flavorjones/loofah/commit/62c04841e8252a1b5373afcd2b89fb9b8279e317
web
-
github.com
/flavorjones/loofah/security/advisories/GHSA-p9wj-w8xq-vjx6
web, advisory
-
github.com
/flavorjones/loofah/releases/tag/v2.25.3
web
-
github.com
/flavorjones/loofah
package
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/loofah/GHSA-p9wj-w8xq-vjx6.yml
web
Sources
- CVE List CVE-2026-126209
- GitHub Advisory GHSA-p9wj-w8xq-vjx6
- NVD CVE-2026-126209
- Maintainer advisory GHSA-p9wj-w8xq-vjx6
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
The maintainers of flavorjones/loofah published their own advisory on GitHub. Reviewed sources take precedence over it.