CVE-2026-83605
massXML Attribute Name Injection in xmldom (npm) Enables Serialized Output Tampering
xmldom, a pure-JavaScript W3C XML DOM parser and serializer distributed on npm as @xmldom/xmldom and the legacy xmldom package, does not validate the name passed to Element.setAttribute(), unlike Document.createAttribute(), which does enforce QName rules. An application that serializes a DOM built with attacker-controlled attribute names is vulnerable: XMLSerializer.serializeToString() emits those names verbatim, and even requireWellFormed: true did not catch the problem, so a crafted name can terminate the intended attribute and inject additional attributes, including event handlers, into output consumed by browsers; synthesized xmlns:PREFIX declarations hit the same unchecked-name boundary. An attacker gains integrity impact by tampering with the serialized markup — for example injecting event-handler attributes into documents rendered by a browser — with no confidentiality or availability impact per the CVSS 4.0 score of 8.7. Any application using @xmldom/xmldom prior to 0.8.14 or 0.9.11, or the legacy xmldom package in version 0.6.0 or earlier, is affected when it serializes attacker-influenced DOM state. No exploitation is known: EPSS is 0.3% (28th percentile), the CVE is not in CISA KEV, and no public proof-of-concept exists.
What to do: Upgrade to @xmldom/xmldom 0.8.14 (for the 0.8.x line) or 0.9.11 (for the 0.9.x line); the legacy xmldom package has no fixed release, so migrate to @xmldom/xmldom. Audit code paths where attacker-controlled strings reach Element.setAttribute() or synthesized xmlns declarations and are later serialized with XMLSerializer, and validate or sanitize attribute names as a mitigation where upgrading is not yet possible.
| xmldom project (npm: @xmldom/xmldom) @xmldom/xmldom | versions prior to 0.8.14 and prior to 0.9.11 (fixed in 0.8.14 and 0.9.11) |
| xmldom project (npm: xmldom, legacy package) xmldom | 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, Element.setAttribute() calls the private _createAttribute(name) path without validating the attribute name, while Document.createAttribute(name) validates against QName. XMLSerializer.serializeToString() emits attribute names verbatim, and requireWellFormed: true did not validate them, so a crafted name can terminate the intended attribute and inject additional attributes, including event handlers, into browser-consumed output; synthesized xmlns:PREFIX declarations expose the same unchecked-name boundary. 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-4w3w-2rp5-g8jm (high)
In the news0 stories
No ingested article mentions this CVE yet.