ZeroHour

CVE-2026-83612

mass

Quadratic resource-exhaustion DoS in @xmldom/xmldom HTML parsing

CVSS 4.0
8.7 high
EPSS
<1%p23
Published
()
Modified
AI analysis

@xmldom/xmldom versions 0.9.0-beta.1 through 0.9.11 mishandle a mixed-case closing tag for the HTML raw-text elements script, style, textarea, and title during HTML-mode parsing via DOMParser.parseFromString(): parseHtmlSpecialContent uses a case-sensitive indexOf() and then calls substring() with a not-found result of -1, causing unstable parser progression and quadratic output amplification (CWE-178, CWE-400). An attacker triggers this by inducing an application to parse and serialize a small, crafted untrusted text/html document. The result is disproportionate CPU and memory consumption, i.e., a denial-of-service impact; the CVSS 4.0 vector (VA:H, all C/I impacts none) indicates no confidentiality or integrity loss. Any Node.js or browser application with a direct or transitive npm dependency on a vulnerable @xmldom/xmldom version is affected. No public proof-of-concept is known, the issue is not in CISA KEV, and EPSS estimates only a 0.3% probability of exploitation in the next 30 days.

What to do: Upgrade @xmldom/xmldom to 0.9.12 or later, including transitive copies (audit with 'npm ls @xmldom/xmldom' or your lockfile scanner). As interim mitigation, avoid parsing untrusted text/html with vulnerable versions, or cap input size and enforce CPU/time limits around parsing and serialization. Applications parsing only non-HTML XML are not exposed to this specific flaw, and no in-the-wild exploitation has been reported.

Affected
xmldom project @xmldom/xmldom (npm)>= 0.9.0-beta.1 and < 0.9.12 (fixed in 0.9.12)
Estimated exposure
mass>100,000 npm-dependent applications/environments (package draws millions of weekly downloads) — Based on @xmldom/xmldom's millions of weekly npm downloads and its broad use as a transitive XML-parsing dependency across the npm ecosystem, which plausibly puts affected installations above the 100,000-system threshold, though practical…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. From 0.9.0-beta.1 until 0.9.12, HTML-mode parsing through DOMParser.parseFromString() mishandles a mixed-case closing tag for the script, style, textarea, or title raw-text elements. parseHtmlSpecialContent, selected by isHTMLRawTextElement or isHTMLEscapableRawTextElement, uses a case-sensitive indexOf() and then calls substring() with a missing-close result of negative one, causing unstable parser progression and quadratic output amplification. A small untrusted text/html document can consequently consume disproportionate CPU and memory when parsed and serialized. This issue is fixed in @xmldom/xmldom version 0.9.12.

Ecosystems
npm
Weakness
CWE-178, CWE-400
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/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
GHSA
GHSA-6mj3-qw4j-hgrw (high)

In the news

No ingested article mentions this CVE yet.