Impact
A flaw in the xmldom library allows an entity reference node to be created with an invalid name. When that node is serialized with XMLSerializer.serializeToString() while requireWellFormed is true, the nodeName is emitted as raw XML. This can introduce attacker‑controlled XML fragments into the serialized output, leading to XML injection vulnerabilities if the output is parsed or evaluated by the application.
Affected Systems
The vulnerability exists in the @xmldom/xmldom and xmldom npm packages for all versions prior to 0.8.15 and 0.9.12. It also affects the older xmldom package for versions 0.6.0 and earlier. The issue is fixed in @xmldom/xmldom 0.8.15, 0.9.12, and newer releases.
Risk and Exploitability
The CVSS score of 6.3 indicates moderate severity. The EPSS score is unavailable and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires an application to call Document.createEntityReference with a crafted name and then serialize the resulting node with requireWellFormed set to true. The resulting serialized output contains attacker‑controlled XML markup that can be re‑parsed by the application, potentially leading to XML injection vulnerabilities.
OpenCVE Enrichment
Github GHSA