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

Source: https://junglewise.ai/threats/cve-2026-83607-xmldom-element-name-injection-via-createelement  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-01. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/xmldom-xmldom), [xmldom (npm)](https://junglewise.ai/threats/technologies/xmldom). Vendors: [npm](https://junglewise.ai/threats/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

  ```sh
  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

- [https://api.github.com/users/bhaswanthc](https://api.github.com/users/bhaswanthc)
- [https://github.com/bhaswanthc](https://github.com/bhaswanthc)
- [https://api.github.com/users/bhaswanthc/gists%7B/gist_id%7D](https://api.github.com/users/bhaswanthc/gists%7B/gist_id%7D)
- [https://api.github.com/users/bhaswanthc/repos](https://api.github.com/users/bhaswanthc/repos)
- [https://avatars.githubusercontent.com/u/92464658?v=4](https://avatars.githubusercontent.com/u/92464658?v=4)
- [https://api.github.com/users/bhaswanthc/events%7B/privacy%7D](https://api.github.com/users/bhaswanthc/events%7B/privacy%7D)

## Related threats

- [xmldom end-tag whitespace-trim ReDoS](https://junglewise.ai/threats/cve-2026-83619-xmldom-end-tag-whitespace-trim-redos)
- [xmldom requireWellFormed DOCTYPE validation bypass via line terminator](https://junglewise.ai/threats/cve-2026-83618-xmldom-requirewellformed-doctype-validation-bypass-via-line)
- [xmldom XMLSerializer requireWellFormed bypass via line terminator](https://junglewise.ai/threats/cve-2026-83617-xmldom-xmlserializer-requirewellformed-bypass-via-line-terminator)
- [xmldom Processing Instruction Target Injection in serialization](https://junglewise.ai/threats/cve-2026-83616-xmldom-processing-instruction-target-injection-in-serialization)
- [xmldom quadratic-memory consumption in namespace parsing](https://junglewise.ai/threats/cve-2026-83615-xmldom-quadratic-memory-consumption-in-namespace-parsing)
