xmldom DOMParser: Unsafe DocType serialization before v0.9.10/v0.8.13
CVE-2026-41674 Published on May 7, 2026
xmldom: XML injection through unvalidated DocumentType serialization
xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) `DOMParser` and `XMLSerializer` module. In @xmldom/xmldom prior to versions 0.9.10 and 0.8.13 and xmldom version 0.6.0 and prior, the package serializes DocumentType node fields (internalSubset, publicId, systemId) verbatim without any escaping or validation. When these fields are set programmatically to attacker-controlled strings, XMLSerializer.serializeToString can produce output where the DOCTYPE declaration is terminated early and arbitrary markup appears outside it. This issue has been patched in versions @xmldom/xmldom versions 0.9.10 and 0.8.13.
Vulnerability Analysis
CVE-2026-41674 is exploitable with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. An automatable proof of concept (POC) exploit exists. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality, a high impact on integrity, and no impact on availability.
Weakness Type
What is an aka Blind XPath Injection Vulnerability?
The software does not properly neutralize special elements that are used in XML, allowing attackers to modify the syntax, content, or commands of the XML before it is processed by an end system. Within XML, special elements could include reserved words or characters such as "<", ">", """, and "&", which could then be used to add new data or modify XML syntax.
CVE-2026-41674 has been classified to as an aka Blind XPath Injection vulnerability or weakness.
Products Associated with CVE-2026-41674
Want to know whenever a new CVE is published for Red Hat products? stack.watch will email you.
Affected Versions
xmldom:- Version xmldom <= 0.6.0 is affected.
- Version @xmldom/xmldom >= 0.9.0, < 0.9.10 is affected.
- Version @xmldom/xmldom < 0.8.13 is affected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.