ZeroHour

CVE-2026-83619

mass

Quadratic ReDoS in @xmldom/xmldom Node.js XML parser

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

A regular-expression denial-of-service (ReDoS) flaw, tracked as CWE-1333 and CWE-400, exists in the @xmldom/xmldom npm package: from version 0.7.0 through versions before 0.8.15, the release-0.8.x parser in lib/sax.js trims captured end-tag names using the unanchored global expression /[ \t\n\r]+$/g, which backtracks quadratically when an end tag contains a long whitespace run followed by a non-whitespace character. An attacker reaches this path by passing a small, crafted XML document to DOMParser.parseFromString() under default options, so a single unauthenticated request can stall the Node.js event loop. The impact is availability only (CVSS 4.0 VA:H with no confidentiality or integrity effects): the host application or service becomes unresponsive while the event loop is blocked. Any Node.js application that parses attacker-controlled XML with an affected 0.7.x-0.8.x release is exposed, including installs where the package arrives as a transitive dependency, while the 0.9.x line and the unscoped xmldom npm package are unaffected. No public proof-of-concept, CISA KEV listing, or confirmed in-the-wild exploitation is known, and EPSS estimates only about a 0.3% probability of exploitation within 30 days.

What to do: Upgrade @xmldom/xmldom to 0.8.15 or later, or migrate to the unaffected 0.9.x line; audit dependency trees (e.g., with npm ls) for transitive uses pinned to 0.7.x-0.8.x and update them as well. As interim mitigation, apply request timeouts and size limits on XML-parsing endpoints and consider rejecting or pre-processing untrusted XML containing long whitespace runs in end tags. The issue is availability-only, so monitor for event-loop stalls rather than data compromise.

Affected
xmldom project (npm: @xmldom/xmldom) @xmldom/xmldom (release-0.8.x parser, lib/sax.js)>= 0.7.0 and < 0.8.15; fixed in 0.8.15
Estimated exposure
massmillions of downstream Node.js installations (tens of millions of weekly npm downloads), though only installs parsing untrusted XML with the 0.7.x-0.8.x line… — Estimate is based on @xmldom/xmldom's position as one of npm's most-downloaded XML parsers, commonly pulled in transitively, which plausibly puts the installed base above the 1M-user threshold; actual attack exposure is narrower because…

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.7.0 until 0.8.15, the release-0.8.x parser in lib/sax.js trims captured end-tag names with the unanchored global expression /[ \t\n\r]+$/g. For an end tag containing a long whitespace run followed by a non-whitespace character, the expression retries from each possible starting position and backtracks quadratically before failing its end anchor. DOMParser.parseFromString() reaches the path under default options, allowing a small unauthenticated XML input to stall the Node.js event loop; the 0.9.x and unscoped npm lines do not contain this expression. This issue is fixed in @xmldom/xmldom version 0.8.15.

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-x4fp-j954-r2f4 (high)

In the news

No ingested article mentions this CVE yet.