CVE-2026-126206
MEDIUM 5.3CVSS 4.0Loofah allowed_uri? treats data:text/html as safe text/plain
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. In 2.25.2, Loofah::HTML5::Scrub.allowed_uri? treats a data URI mediatype containing the HTML5 named solidus reference / as malformed and falls back to the allowed text/plain, while a browser decodes the reference and interprets the same value as text/html. An application that validates a user-controlled URL with this helper and renders the approved value in href or another browser-interpreted URI attribute can allow cross-site scripting. Rails::HTML::Sanitizer.allowed_uri? re-exports the affected helper. Loofah's default sanitize() path is not affected because Nokogiri decodes the entity before URI validation. This issue is fixed in version 2.25.3.
- Published
- 12 Nov 2026
- Last modified
- 13 Nov 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Awaiting Analysis
- Weakness
- CWE-184CWE-79
- Also known as
- GHSA-jcff-cj73-4w4f
- Sources
- NVDJSONOSV GHSA-jcff-cj73-4w4fJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 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 |
| OSV | GitHub | CVSS 4.0 | 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 |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | RubyGems | loofah | >= 2.25.2, < 2.25.3 | 2.25.3 |
References
- https://github.com/flavorjones/loofah/commit/ad92002966053309f83b550861e2ef04bc714744 · WEB
- https://github.com/flavorjones/loofah/pull/324 · WEB
- https://github.com/flavorjones/loofah/releases/tag/v2.25.3 · WEB
- https://github.com/flavorjones/loofah/security/advisories/GHSA-jcff-cj73-4w4f · WEB
- https://github.com/flavorjones/loofah · PACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/loofah/GHSA-jcff-cj73-4w4f.yml · WEB
History
- 25 Nov 2026 21:23 UTC · NVD: first stored (published 12 Nov 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 12 Nov 2026)