CVE-2026-126205
published medium CVSS 3.1 · 5.3Loofah: Regular expression denial of service in the SVG local-reference check
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| flavorjones | — | loofah< 2.25.3 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| flavorjones | loofah | < 2.25.3 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-400 CWE-400: Uncontrolled Resource Consumption
- CWE-1333 CWE-1333: Inefficient Regular Expression Complexity
References
4Provider assertions
2GitHub_M · cna
Loofah: Regular expression denial of service in the SVG local-reference check
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 9b0385cdf1a75484ef739dc68d305bbf83e6ddc0e8c9152ba96d116be28f7a58
- Ingested
- 16 Nov 2026, 19:35:24 UTC
- Source record
- Official CVE record