Description
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, Document.createElement(tagName) stores an unvalidated element name and XMLSerializer.serializeToString() emits that name verbatim. The requireWellFormed: true path did not validate the element qualified name or synthesized xmlns:PREFIX declaration, so attacker-controlled tag names could inject attributes, elements, or processing instructions into serialized XML or HTML and could cause cross-site scripting when browser-consumed. The unchecked values violate the XML QName constraint, and default serialization and creation-time createElement() behavior remain permissive. This issue is fixed in @xmldom/xmldom versions 0.8.14 and 0.9.11; no fixed version is available for xmldom.
Published: 2026-09-01
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: Cross‑site scripting via XML serialization
Action: Immediate patch
AI Analysis

Impact

xmldom, a JavaScript DOM implementation, allows developers to create elements with arbitrary tag names. The library bypasses the well‑formedness check for element names, letting malicious tag names contain attribute and processing instruction syntax. When the XML is later serialized, these injections are emitted verbatim, potentially introducing JavaScript into browser‑consumed content and enabling cross‑site scripting. The weakness is a form of resource injection and violates the XML QName constraint.

Affected Systems

The vulnerability affects versions of @xmldom/xmldom prior to 0.8.14 and 0.9.11, as well as xmldom version 0.6.0 and older. Any project that imports these libraries and uses Document.createElement before serialization is at risk. The issue is not tied to a specific operating system or runtime, but to JavaScript environments that include or depend on this library.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity, and the EPSS score is unavailable, so the exact exploitation probability is unclear, but the lack of validation gives attackers a clear attack surface when they control the arguments to createElement. The vulnerability is not listed in the CISA KEV catalog. Likely exploitation requires an attacker to supply tag names in code that runs xmldom, such as a malicious JSON payload or a UI that passes user input directly to createElement. Once the serialized XML/HTML reaches a browser, the injected markup can execute in the page context.

Generated by OpenCVE AI on September 2, 2026 at 04:39 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade @xmldom/xmldom to version 0.8.14 or 0.9.11, which implement proper QName validation when requireWellFormed is true.
  • If upgrading is not immediately possible, validate or sanitize the tagName before calling Document.createElement, ensuring it conforms to the XML QName syntax and does not contain special characters or attribute syntax.
  • Avoid sending XML content created with xmldom directly to browsers; if such content must be provided, serialize it on the server side and apply additional output escaping or use an alternative library that enforces well‑formed names.

Generated by OpenCVE AI on September 2, 2026 at 04:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-w2rr-34g9-rvrj xmldom: Element name injection via createElement() bypasses requireWellFormed
History

Wed, 02 Sep 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-79
References
Metrics threat_severity

None

cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N'}

threat_severity

Important


Tue, 01 Sep 2026 22:00:00 +0000

Type Values Removed Values Added
First Time appeared Xmldom
Xmldom xmldom
Vendors & Products Xmldom
Xmldom xmldom
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 01 Sep 2026 14:45:00 +0000

Type Values Removed Values Added
Description 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, Document.createElement(tagName) stores an unvalidated element name and XMLSerializer.serializeToString() emits that name verbatim. The requireWellFormed: true path did not validate the element qualified name or synthesized xmlns:PREFIX declaration, so attacker-controlled tag names could inject attributes, elements, or processing instructions into serialized XML or HTML and could cause cross-site scripting when browser-consumed. The unchecked values violate the XML QName constraint, and default serialization and creation-time createElement() behavior remain permissive. This issue is fixed in @xmldom/xmldom versions 0.8.14 and 0.9.11; no fixed version is available for xmldom.
Title xmldom: Element name injection via createElement() bypasses requireWellFormed
Weaknesses CWE-91
References
Metrics cvssV4_0

{'score': 8.7, '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-01T15:28:37.947Z

Reserved: 2026-08-31T20:36:25.743Z

Link: CVE-2026-83607

cve-icon Vulnrichment

Updated: 2026-09-01T15:28:33.075Z

cve-icon NVD

Status : Deferred

Published: 2026-09-01T15:17:38.650

Modified: 2026-09-08T21:11:31.703

Link: CVE-2026-83607

cve-icon Redhat

Severity : Important

Publid Date: 2026-09-01T14:23:58Z

Links: CVE-2026-83607 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-02T04:45:17Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

  • CWE-91

    XML Injection (aka Blind XPath Injection)