Impact
The vulnerability occurs because the xmldom library does not validate processing instruction data before serializing it to XML. An attacker can inject the PI‑closing sequence ?> early in the data, causing the serializer to terminate the processing instruction prematurely and insert arbitrary XML nodes into the output. This corrupts the XML structure and can allow downstream code to execute unwanted logic or treat the injected nodes as legitimate data.
Affected Systems
All installs of the xmldom package that predate release 0.9.10 or 0.8.13, including xmldom 0.6.0 and earlier, are affected. The patch was incorporated in both the 0.9.10 and 0.8.13 releases of @xmldom/xmldom.
Risk and Exploitability
The CVSS score of 8.7 classifies the issue as high severity. No EPSS data is available and the vulnerability is not listed in the CISA KEV catalog, but the flaw presents a classic injection vector: any system that passes untrusted data through xmldom’s XMLSerializer is susceptible to malicious XML injection.
OpenCVE Enrichment
Github GHSA