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

Source: https://junglewise.ai/threats/cve-2026-83606-xmldom-pi-grammar-regex-redos-in-unterminated-processing  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-01. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/xmldom-xmldom). Vendors: [npm](https://junglewise.ai/threats/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

  ```sh
  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

- [https://github.com/xmldom/xmldom/security/advisories/GHSA-g53g-w8rj-fmg7](https://github.com/xmldom/xmldom/security/advisories/GHSA-g53g-w8rj-fmg7)
- [https://github.com/xmldom/xmldom/pull/1039](https://github.com/xmldom/xmldom/pull/1039)
- [https://github.com/xmldom/xmldom/commit/73df6b8bdbd86f904b9e8c3ab9c49aa54ef2802e](https://github.com/xmldom/xmldom/commit/73df6b8bdbd86f904b9e8c3ab9c49aa54ef2802e)
- [https://github.com/xmldom/xmldom/releases/tag/0.9.11](https://github.com/xmldom/xmldom/releases/tag/0.9.11)
- [https://api.github.com/repos/xmldom/xmldom/security-advisories/GHSA-g53g-w8rj-fmg7](https://api.github.com/repos/xmldom/xmldom/security-advisories/GHSA-g53g-w8rj-fmg7)

## Related threats

- [xmldom end-tag whitespace-trim ReDoS](https://junglewise.ai/threats/cve-2026-83619-xmldom-end-tag-whitespace-trim-redos)
- [xmldom requireWellFormed DOCTYPE validation bypass via line terminator](https://junglewise.ai/threats/cve-2026-83618-xmldom-requirewellformed-doctype-validation-bypass-via-line)
- [xmldom XMLSerializer requireWellFormed bypass via line terminator](https://junglewise.ai/threats/cve-2026-83617-xmldom-xmlserializer-requirewellformed-bypass-via-line-terminator)
- [xmldom Processing Instruction Target Injection in serialization](https://junglewise.ai/threats/cve-2026-83616-xmldom-processing-instruction-target-injection-in-serialization)
- [xmldom quadratic-memory consumption in namespace parsing](https://junglewise.ai/threats/cve-2026-83615-xmldom-quadratic-memory-consumption-in-namespace-parsing)
