CVE-2026-83607
massXML Injection in @xmldom/xmldom createElement/serializeToString Enables XSS
The xmldom library (maintained as @xmldom/xmldom on npm) fails to validate the qualified name passed to Document.createElement(), and XMLSerializer.serializeToString() emits that name verbatim, violating the XML QName constraint; the requireWellFormed: true path also does not validate the element name or the synthesized xmlns:PREFIX declaration. An attacker who controls tag names in documents that are created or serialized can inject attributes, elements, or processing instructions into the resulting XML or HTML. When that serialized output is consumed in a browser, the injected markup can lead to cross-site scripting and tampering with downstream XML consumers. Any JavaScript project using the affected npm packages to create or serialize attacker-influenced XML is affected: @xmldom/xmldom users prior to 0.8.14 and 0.9.11, and users of the legacy xmldom package 0.6.0 and earlier, for which no fixed version exists. No exploitation is currently known: there is no public proof-of-concept, the flaw is not in CISA KEV, and EPSS estimates only a 0.3% chance of exploitation within 30 days.
What to do: Upgrade @xmldom/xmldom to 0.8.14 or 0.9.11 depending on your release line; for the legacy xmldom package (0.6.0 and earlier) no fixed version is available, so migrate to the maintained @xmldom/xmldom package. Audit whether your application passes attacker-controlled tag names to createElement() or serializes attacker-influenced XML/HTML into browser-facing output, and as an interim measure validate/escape element names at the application layer.
| xmldom project @xmldom/xmldom (npm) | prior to 0.8.14 (0.8.x line) and prior to 0.9.11 (0.9.x line) |
| xmldom project xmldom (npm, 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.14 and 0.9.11, and in xmldom version 0.6.0 and earlier, Document.createElement(tagName) stores an unvalidated element name and XMLSerializer.serializeToString() emits that name verbatim. The requireWellFormed: true path did not validate the element qualified name or synthesized xmlns:PREFIX declaration, so attacker-controlled tag names could inject attributes, elements, or processing instructions into serialized XML or HTML and could cause cross-site scripting when browser-consumed. The unchecked values violate the XML QName constraint, and default serialization and creation-time createElement() behavior remain permissive. This issue is fixed in @xmldom/xmldom versions 0.8.14 and 0.9.11; 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-w2rr-34g9-rvrj (high)
In the news0 stories
No ingested article mentions this CVE yet.