highVulnerability

CVE-2026-83607

## Summary `Document.createElement()` in `@xmldom/xmldom` accepts arbitrary strings as the `tagName` parameter with zero validation. The serializer emits the tag name verbatim into XML/HTML output. Critically, the `requireWellFormed: true` serializer option — the recommended mitigation from CVE-2026-41672, CVE-2026-41674, and CVE-2026-34601 — did NOT catch this, making it a bypass of the existing security controls. An attacker who controls the element name string can inject arbitrary attributes (including event handlers) into the serialized output, leading to XSS when the output is consumed by a browser or downstream parser. ## Details `Document.createElement()` accepts any string as `tagName` and stores it directly on the element node without validation. When the document is later serialized via `XMLSerializer.serializeToString()`, the serializer emits the `tagName` verbatim into the output. The XML specification requires element names to conform to the `Name` production. The existing `createAttributeNS()` and `createElementNS()` methods validate qualified names against an anchored name/`QName` pattern, but `createElement()` bypasses this entirely, and the `requireWellFormed: true` serializer path performed no element-name validation — rendering it ineffective against this vector. ### Root Cause 1. `createElement()` stores the raw `tagName` string without any validation. 2. The serializer's `requireWellFormed` code path did not validate element names against the XML `Name`/`QName` production. 3. The serializer emits `tagName` directly into angle brackets: `<${tagName}...>`. ## Proof of Concept ```js const { DOMImplementation, XMLSerializer } = require('@xmldom/xmldom'); const impl = new DOMImplementation(); const serializer = new XMLSerializer(); const doc = impl.createDocument(null, 'root', null); // Inject an element whose "name" contains attributes with an XSS payload const el = doc.createElement('img src=x onerror="alert(1)"'); doc.documentElement.ap

Properties

ghsa_id
GHSA-w2rr-34g9-rvrj
summary
xmldom: Element name injection via createElement() bypasses requireWellFormed
severity
high
epss_score
0.00348
cve_id
CVE-2026-83607
is_ghsa_only
false
ghsa_published
2026-09-08T20:31:08Z
source_url
https://github.com/advisories/GHSA-w2rr-34g9-rvrj
epss_percentile
0.27757
ghsa_updated
2026-09-08T20:31:09Z

Related Entities (7)

ENRICHED_BY (1)

[Source]FIRST EPSS

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (2)

[Software]npm/@xmldom/xmldom
[Software]npm/xmldom

AFFECTS (2)

[Software]npm/@xmldom/xmldom
[Software]npm/xmldom

HAS_WEAKNESS (1)

[Weakness]XML Injection (aka Blind XPath Injection)

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-83607 — Ninja Signal Threat Intelligence | Ninja Signal