CVE-2026-83606: xmldom PI grammar regex ReDoS in unterminated processing instructions

CVE-2026-83606 · Severity: high · CVSS 4 · Published 2026-09-01

@xmldom/xmldom is a popular XML parsing library used to read and process XML documents in Node.js applications. The library contains a regular expression vulnerability that causes the parser to consume excessive CPU time when processing maliciously crafted XML with unterminated processing instructions. An attacker can send a single small XML document to a server to stall the Node.js event loop for multiple seconds, causing denial of service and preventing the server from handling legitimate requests.

Technologies: @xmldom/xmldom (npm). Vendors: npm.

Quick answers

Is CVE-2026-83606 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-83606 being exploited in the wild.
How severe is CVE-2026-83606?
High severity, with a CVSS score of 4, published 1 September 2026.
Which products and versions are affected?
@xmldom/xmldom (npm) >= 0.9.0-beta.9, <= 0.9.10, SEMVER:introduced=0.9.0-beta.9,fixed=0.9.11.
Is there a fix for CVE-2026-83606?
Yes. @xmldom/xmldom (npm): upgrade to 0.9.11 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-83606 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-83606?
Check whether you run @xmldom/xmldom (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @xmldom/xmldom (npm): upgrade to 0.9.11 or later
    npm install @xmldom/xmldom@0.9.11

Technical details

The vulnerability is a ReDoS (Regular Expression Denial of Service) affecting the PI (processing instruction) production in lib/grammar.js. The regex pattern uses both a greedy separator (S+) and a lazy quantifier (Char*?) that can both match XML whitespace. When parsing an unterminated processing instruction (missing the closing `?>`), the regex engine must try every partition of the whitespace between these two quantifiers before ultimately failing, resulting in O(n²) time complexity. The regex is invoked in parsePI() and parseProcessingInstruction() functions in lib/sax.js, executing against the entire remaining source string. Only versions 0.9.0-beta.9 through 0.9.10 are affected; versions 0.8.x and earlier use a different bounded PI parsing approach. The fix in 0.9.11 inserts a fixed-width negative lookahead (?!\\s) after the greedy S+ to prevent backtracking while maintaining correct behavior on valid XML.

Affected products

  • xmldom @xmldom/xmldom 0.9.0-beta.9 through 0.9.10

Identifiers

  • CVE-2026-83606
  • GHSA-g53g-w8rj-fmg7

Timeline

  • 2026-08-12: disclosed
  • 2026-09-08: patched: Fixed in version 0.9.11 via PR #1039

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.