CVE-2026-126205
Description
Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Prior to 2.25.3, the Loofah HTML5 sanitizer checks href and xlink:href on elements in SVG_ALLOW_LOCAL_HREF with a regular expression whose line anchor and newline-matching whitespace cause an all-whitespace value to be rescanned from every line start. An attacker can submit an SVG reference element with a long multiline-whitespace attribute and consume CPU quadratically during sanitization. CRuby 3.1 and earlier and JRuby are affected, while CRuby 3.2 and later uses linear-time regular-expression matching. The default safelist reaches the vulnerable check without a configuration change. This issue is fixed in version 2.25.3.
Weakness
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | yes |
| Technical impact | partial |
| Scored | 2026-11-16 |
Timeline
- 2026-11-12Published by the CNA20:41 UTC
- 2026-11-12GitHub advisory published (GHSA-mf2j-8f84-cc9q)same day
- 2026-11-12Published in NVD21:17 UTC · 35 minutes after the CNA
- 2026-11-16CISA SSVC decision recorded4 days after publication
Exploit and advisory records
GitHub advisory GHSA-mf2j-8f84-cc9q, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| RubyGems loofah | 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/2f31e7fae36036c9882d3d0fae720e1014c57cd1
- 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-mf2j-8f84-cc9q
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-126205'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-126205'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-126205'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-126205'
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).