CVE-2026-83609
massXML Name Validation Flaw Enables Markup Injection in @xmldom/xmldom
@xmldom/xmldom versions 0.9.0 through 0.9.11 mishandle QName validation because the shared reg() builder in lib/grammar.js compiles the anchored QName_exact validator with the multiline flag, so the ^ and $ anchors validate only a single line instead of the complete XML name. As a result, createElementNS, createAttributeNS, createDocumentType, and createAttribute accept malformed XML names whose first line is valid while later lines — separated by U+000A, U+000D, U+2028, or U+2029 — go unvalidated, and that later text is emitted as injected markup when the document is serialized, including through the requireWellFormed: true path. An attacker who can influence the XML names passed to these APIs can therefore inject arbitrary markup into serialized XML output, yielding a high integrity impact per the CVSS 4.0 score of 8.7, with no rated confidentiality or availability impact. Any JavaScript/Node.js application or library consuming the affected 0.9.x releases of this widely used npm package, where attacker-controlled strings reach the affected APIs, is exposed; users of releases before 0.9.0 or of the fixed 0.9.12 release are not affected. There is no public proof-of-concept, the flaw is not in CISA's KEV, and EPSS currently estimates a 0.3% probability of exploitation within 30 days, so no in-the-wild exploitation is known.
What to do: Upgrade @xmldom/xmldom to 0.9.12 or later, including as a transitive dependency (verify with npm ls @xmldom/xmldom). Until patched, avoid passing untrusted strings containing U+000A, U+000D, U+2028, or U+2029 to createElementNS, createAttributeNS, createDocumentType, or createAttribute, and review serialized XML output for injected markup.
| xmldom maintainers (published on npm as @xmldom/xmldom) @xmldom/xmldom (pure JavaScript W3C XML DOM Level 2 Core DOMParser/XMLSerializer module) | 0.9.0 through 0.9.11 (all releases from 0.9.0 until 0.9.12; fixed in 0.9.12) |
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. From 0.9.0 until 0.9.12, the shared reg() builder in lib/grammar.js compiles the anchored QName_exact validator with the multiline flag, so ^ and $ validate only one line instead of the complete name. createElementNS, createAttributeNS, createDocumentType, and createAttribute consequently accept a malformed XML name whose first line is valid and whose later text injects markup when serialized through either the default path or requireWellFormed: true. The triggering ECMAScript line terminators are U+000A, U+000D, U+2028, and U+2029. This issue is fixed in @xmldom/xmldom version 0.9.12.
- Ecosystems
- npm
- Weakness
- CWE-91, CWE-625
- 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-3px3-54cx-rmw9 (high)
In the news0 stories
No ingested article mentions this CVE yet.