Description
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.
Published: 2026-09-01
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: XML name injection via embedded line terminators
Action: Apply Patch
AI Analysis

Impact

The vulnerability lies in the xmldom library’s XML name validation. From version 0.9.0 up to (and excluding) 0.9.12, the internal regular expression that checks XML names is compiled with multiline matching enabled. This causes the start (^) and end ($) anchors to apply only to the first line of the string. As a result, a string that starts with a syntactically valid XML name but continues with a line terminator and additional characters is accepted. When such a malformed name is later serialized, the inserted line terminator creates a new line and the trailing characters are interpreted as part of the XML document, enabling the injection of arbitrary markup. This could compromise the integrity of data or trigger downstream code paths that treat the injected markup as legitimate, potentially exposing the application to further injection or execution attacks, consistent with CWE-625 (Improper Validation or Sanitization) and CWE-91 (XML Injection).

Affected Systems

The affected product is the xmldom JavaScript library. Versions from 0.9.0 through 0.9.11 inclusive contain the vulnerable code path (createElementNS, createAttributeNS, createDocumentType, and createAttribute). The issue was fixed in version 0.9.12 and later releases.

Risk and Exploitability

The CVSS score is 8.7, indicating high severity. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector involves code running in an environment that uses xmldom to build or serialize XML documents; a malicious input can be supplied via application data or configuration that ultimately forms part of an element or attribute name. Successful exploitation would allow injection of arbitrary XML content, which can then be used for downstream attacks or data corruption. As the vulnerability is tied to library calls rather than a publicly exposed network interface, it is more likely to be exploited by attackers who have local code execution or the ability to influence the application’s input sources.

Generated by OpenCVE AI on September 1, 2026 at 16:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade xmldom to version 0.9.12 or later to remove the vulnerable validation logic.
  • If an immediate upgrade is not possible, audit all calls to createElementNS, createAttributeNS, createDocumentType, and createAttribute to ensure that no line terminators are present in the names; add defensive string checks before serialization.
  • Implement a custom wrapper that validates XML names against a single‑line regular expression or rejects any string containing EOL characters before passing it to xmldom.

Generated by OpenCVE AI on September 1, 2026 at 16:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-3px3-54cx-rmw9 xmldom: Creation-time XML Name/QName validation is bypassable via an embedded line terminator, allowing injection on the default serialization path
History

Wed, 02 Sep 2026 08:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


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

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

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. 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.
Title xmldom: Creation-time XML Name/QName validation is bypassable via an embedded line terminator, allowing injection on the default serialization path
Weaknesses CWE-625
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-01T18:10:19.349Z

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

Link: CVE-2026-83609

cve-icon Vulnrichment

Updated: 2026-09-01T17:34:34.223Z

cve-icon NVD

Status : Deferred

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

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

Link: CVE-2026-83609

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-01T16:30:17Z

Weaknesses
  • CWE-625

    Permissive Regular Expression

  • CWE-91

    XML Injection (aka Blind XPath Injection)