ZeroHour

CVE-2026-83606

mass1

ReDoS in @xmldom/xmldom XML parser stalls Node.js event loop

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

@xmldom/xmldom, a pure-JavaScript W3C-standard DOMParser/XMLSerializer module on npm, contains a quadratic-backtracking regular-expression flaw (ReDoS, CWE-1333/CWE-400) in its processing-instruction grammar. When the required closing ?> terminator is absent, the greedy S+ separator and lazy Char*? data group repeatedly repartition a long whitespace tail, and because parsePI and parseProcessingInstruction apply the expression to the entire remaining source, DOMParser.parseFromString() under default options suffers quadratic backtracking. An unauthenticated attacker who can submit crafted XML — a small input containing a whitespace-heavy, unterminated processing instruction — to any application or endpoint that parses untrusted XML with an affected version can stall the Node.js event loop, denying service to the entire process. All consumers of @xmldom/xmldom from 0.9.0-beta.9 up to but not including 0.9.11 are affected; the impact is availability-only (CVSS 4.0 VA:H with no confidentiality or integrity impact), and versions prior to 0.9.0-beta.9 are outside the affected range. Exploitation has not been observed: there is no public PoC, the CVE is not in CISA KEV, and EPSS assigns only a 0.3% probability of exploitation in the next 30 days.

What to do: Upgrade to @xmldom/xmldom 0.9.11 or later, and audit lockfiles, SBOMs and transitive dependency trees (e.g., npm ls @xmldom/xmldom) for versions 0.9.0-beta.9 through 0.9.10. Until patched, avoid parsing attacker-supplied XML with affected versions, or apply request-size limits, parser timeouts, and input checks that reject unterminated, whitespace-heavy processing instructions. Treat this as an availability-only risk: no data exposure is expected, but a successful DoS stalls the whole Node.js process, so prioritize fixes for internet-facing XML-parsing endpoints.

Affected
xmldom maintainers (npm package @xmldom/xmldom, CNA: GitHub security-advisories) @xmldom/xmldom (DOMParser/XMLSerializer for Node.js)>=0.9.0-beta.9 and <0.9.11 (0.9.0-beta.9 through 0.9.10); fixed in 0.9.11
Estimated exposure
masslikely on the order of 1M+ Node.js application installations consuming @xmldom/xmldom 0.9.x (package draws tens of millions of weekly npm downloads; only 0.9.x… — @xmldom/xmldom is one of npm's most-downloaded XML parsing libraries with tens of millions of weekly downloads and thousands of transitive dependents, so the 0.9.x line plausibly exceeds 100,000 deployed systems, though exact counts of…

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.9 until 0.9.11, the processing-instruction production in lib/grammar.js lets the greedy S+ separator and lazy Char*? data group repeatedly repartition a long whitespace tail when the required closing ?> is absent. Both parsePI and parseProcessingInstruction apply the expression to the entire remaining source, causing quadratic backtracking during DOMParser.parseFromString() under default options and allowing a small unauthenticated XML input to stall the Node.js event loop. This issue is fixed in @xmldom/xmldom version 0.9.11.

Ecosystems
npm
Weakness
CWE-400, CWE-1333
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-g53g-w8rj-fmg7 (high)

In the news

No ingested article mentions this CVE yet.