CVE-2026-83608
massXML injection via unvalidated doctype name in xmldom (@xmldom/xmldom)
xmldom and @xmldom/xmldom fail to validate the DocumentType name when running in strict mode (requireWellFormed: true): publicId, systemId, and internalSubset are checked, but the name is emitted verbatim into the <!DOCTYPE ...> declaration. An attacker who controls a doctype name — via createDocumentType() on the 0.8.x and unscoped 0.6.0-and-earlier lines, or via a direct write to DocumentType.name on every affected line — can use a '>' or whitespace character to terminate the declaration early and inject sibling markup into the serialized XML. This corrupts or tampers with XML delivered to downstream consumers, scored as a network-exploitable, high-integrity issue (CVSS 4.0 8.7) with no confidentiality or availability impact. Any npm-consuming application that serializes XML with @xmldom/xmldom prior to 0.8.15 or 0.9.12, or with the legacy unscoped xmldom package 0.6.0 and earlier, is affected; deployments using only the default permissive path are less likely to be exploitable. No exploitation has been reported: there is no public proof-of-concept, the flaw is not in CISA's KEV, and EPSS estimates a 0.3% chance of exploitation within 30 days.
What to do: Upgrade to @xmldom/xmldom 0.8.15 or 0.9.12 (or later); the legacy unscoped xmldom package has no fixed release, so migrate to the scoped @xmldom/xmldom package. Audit code that calls createDocumentType() or writes DocumentType.name with user-controlled input and, as a mitigation, validate that the name matches an XML Name production (no '>' or whitespace) before serialization, especially when running with requireWellFormed: true. Scan your dependency tree (npm audit/lockfiles) for both xmldom and @xmldom/xmldom to find affected transitive dependencies.
| xmldom project (npm) @xmldom/xmldom | all versions prior to 0.8.15 and prior to 0.9.12; fixed in 0.8.15 and 0.9.12 |
| xmldom project (npm) xmldom (unscoped legacy package) | 0.6.0 and earlier; no fixed version available |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. Prior to @xmldom/xmldom versions 0.8.15 and 0.9.12, and in xmldom version 0.6.0 and earlier, the DOCUMENT_TYPE_NODE branch in lib/dom.js validates publicId, systemId, and internalSubset under requireWellFormed: true but emits DocumentType.name verbatim. A name containing > or whitespace can terminate the declaration and inject sibling markup; the value can be supplied through createDocumentType() on the 0.8.x and unscoped lines or through a direct DocumentType.name property write on every affected line. The default path and legacy creation-time behavior remain permissive, while the vulnerable strict path fails to enforce an XML Name. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.
- Ecosystems
- npm
- Weakness
- CWE-91
- Vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- GHSA
- GHSA-27p8-2357-5qqv (high)
In the news0 stories
No ingested article mentions this CVE yet.