CVE-2026-83607: xmldom Element name injection via createElement

CVE-2026-83607 · Severity: high · CVSS 4 · Published 2026-09-01

xmldom is a popular JavaScript XML/DOM library used to build and serialize XML documents. When applications construct DOM elements from untrusted input (via `createElement()`), an attacker can inject malicious attributes and event handlers that execute as JavaScript when the serialized XML is consumed by a browser—a cross-site scripting (XSS) attack. The library's recommended security control (`requireWellFormed: true`) was supposed to block this but did not, leaving applications relying on that mitigation unprotected.

Technologies: @xmldom/xmldom (npm), xmldom (npm). Vendors: npm.

Quick answers

Is CVE-2026-83607 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-83607 being exploited in the wild.
How severe is CVE-2026-83607?
High severity, with a CVSS score of 4, published 1 September 2026.
Which products and versions are affected?
@xmldom/xmldom (npm) SEMVER:introduced=0.9.0,fixed=0.9.11; xmldom (npm) SEMVER:introduced=0,last_affected=0.6.0.
Is there a fix for CVE-2026-83607?
Yes. @xmldom/xmldom (npm): upgrade to 0.9.11 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-83607 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-83607?
Check whether you run @xmldom/xmldom (npm) or xmldom (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @xmldom/xmldom (npm): upgrade to 0.9.11 or later
    npm install @xmldom/xmldom@0.9.11

Technical details

The vulnerability is an element-name injection flaw in the `Document.createElement()` method. `createElement()` accepts arbitrary strings as the `tagName` parameter without validation, storing the raw input directly on the element node. When `XMLSerializer.serializeToString()` is called, the tag name is emitted verbatim into the serialized output (e.g., `<img src=x onerror="alert(1)"/>`). The XML and DOM specifications require element names to conform to the `Name` and `QName` productions, but this validation was missing from both the creation and serialization paths. Although `createElementNS()` and the `requireWellFormed: true` serializer option performed validation on qualified names, they did not validate element names in `createElement()`, creating a bypass. The fix adds QName validation to the serializer's `requireWellFormed: true` code path, throwing `InvalidStateError` before emitting malformed names; however, this protection is opt-in and does not validate at element-creation time.

Affected products

  • xmldom @xmldom/xmldom >= 0.9.0, <= 0.9.10; >= 0.7.0, <= 0.8.13
  • xmldom xmldom <= 0.6.0

Identifiers

  • CVE-2026-83607
  • GHSA-w2rr-34g9-rvrj

Timeline

  • 2026-09-08: disclosed: Vulnerability published by GitHub Advisory Database
  • 2026-09-08: patched: Fixed in @xmldom/xmldom 0.9.11 and 0.8.14 under requireWellFormed: true option (opt-in)

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.