Intel

AIKIDO-2026-370943

@xmldom/xmldom is vulnerable to Regular Expression Denial of Service (ReDoS)

Regular Expression Denial of Service (ReDoS)GHSA-g53g-w8rj-fmg7 Published Aug 14, 2026

87

High Risk

This Affects:

JS@xmldom/xmldom
0.9.0 - 0.9.10
Fixed in 0.9.11
Are you affected? Scan for Free

TL;DR

The processing-instruction grammar regular expression in the parser backtracks quadratically when it encounters an unterminated processing instruction. A small document with a long run of whitespace after an unterminated processing instruction forces the regex engine into O(n^2) work, stalling the single-threaded event loop. The input is reachable through DOMParser.parseFromString with default options, so untrusted XML from network sources can trigger the slowdown. The fix inserts a fixed-width negative lookahead after the whitespace separator so the pattern can no longer backtrack.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you parse untrusted XML using DOMParser.parseFromString.

Background info

@xmldom/xmldom is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 0.9.0 - 0.9.10.

How to fix this

Upgrade the @xmldom/xmldom library to the patch version.