CVE-2026-126203
Description
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. From 2.21.0 until 2.25.3, Loofah's HTML5 APIs Loofah.html5_fragment, Loofah.html5_document, and the scrub_html5_* methods can emit sanitized output that a browser reparses as different markup when used with Nokogiri before 1.19.5, because those Nokogiri versions do not escape angle brackets in attribute values. MathML can place markup inside an allowed attribute so the reparsed output becomes live HTML. The :strip scrubber is affected in every browser, while :prune and :escape are affected in WebKit browsers. Loofah's HTML4 APIs, Loofah::Helpers.sanitize, :whitewash, rails-html-sanitizer's default configuration, and JRuby are not affected. This issue is fixed in version 2.25.3.
Weakness
- CWE-79: Improper Neutralization of Input During Web Page Generation
- CWE-116: Improper Encoding or Escaping of Output
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | no |
| Technical impact | partial |
| Scored | 2026-11-12 |
Timeline
- 2026-11-12Published by the CNA18:06 UTC
- 2026-11-12GitHub advisory published (GHSA-h6v6-rg66-fqj4)same day
- 2026-11-12CISA SSVC decision recordedsame day
Exploit and advisory records
GitHub advisory GHSA-h6v6-rg66-fqj4, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| RubyGems loofah | from 2.21.0 before 2.25.3 | 2.25.3 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| flavorjones loofah |
References
- https://github.com/flavorjones/loofah/commit/7ba1e7b77e043fb7dc832ef746fcbf83137135e6
- https://github.com/flavorjones/loofah/pull/324
- https://github.com/flavorjones/loofah/releases/tag/v2.25.3
- https://github.com/flavorjones/loofah/security/advisories/GHSA-h6v6-rg66-fqj4
- https://github.com/sparklemotion/nokogiri/commit/635abc8d65c75d594ddf8957fbfbfd822c2c0dbd
- https://github.com/sparklemotion/nokogiri/pull/3741
- https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-126203'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-126203'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-126203'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-126203'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).