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, Element.setAttribute() calls the private _createAttribute(name) path without validating the attribute name, while Document.createAttribute(name) validates against QName. XMLSerializer.serializeToString() emits attribute names verbatim, and requireWellFormed: true did not validate them, so a crafted name can terminate the intended attribute and inject additional attributes, including event handlers, into browser-consumed output; synthesized xmlns:PREFIX declarations expose the same unchecked-name boundary. 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 injected attributes
Action: Apply Patch
AI Analysis

Impact

The vulnerability lies in the Element.setAttribute() method of xmldom, which calls an unvalidated internal path, allowing a crafted attribute name to terminate the intended attribute and inject additional attributes, including event handlers, into serialized XML. When this XML is consumed by a browser, the injected attributes can execute unintended code, resulting in XSS or other DOM‑level attacks. The flaw is a classic Attribute Injection weakness (CWE‑91) and a stored Cross‑Site Scripting vector (CWE‑79).

Affected Systems

Vendors: @xmldom/xmldom and xmldom; product: xmldom. Affected versions are all releases prior to 0.8.14 and 0.9.11 of @xmldom/xmldom, and xmldom 0.6.0 and earlier. Any installation using these versions that retrieves XML via xmldom and subsequently renders it in a browser is at risk.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity, and while EPSS data is not available, the issue is not yet listed in the CISA KEV catalog. Exploitation requires that the serialized XML be delivered to a browser context; the attacker must craft XML that, when parsed by xmldom, produces malicious attributes. Because the requireWellFormed flag does not enforce attribute name validation, detection is non‑trivial, making an attacker’s job easier. A successful injection directly yields cross‑site scripting through event handlers or other injected attributes.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to @xmldom/xmldom version 0.8.14 or later (or 0.9.11 or newer).
  • If the project cannot upgrade, replace xmldom with a library that performs proper QName validation on attributes.
  • If neither replacement nor upgrade is possible, sanitize or validate all attribute names before calling setAttribute, ensuring they do not contain characters that could terminate the attribute or inject new ones.

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

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-4w3w-2rp5-g8jm xmldom: Attribute name injection via setAttribute() bypasses requireWellFormed
History

Thu, 03 Sep 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


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

Tue, 01 Sep 2026 14:30: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, Element.setAttribute() calls the private _createAttribute(name) path without validating the attribute name, while Document.createAttribute(name) validates against QName. XMLSerializer.serializeToString() emits attribute names verbatim, and requireWellFormed: true did not validate them, so a crafted name can terminate the intended attribute and inject additional attributes, including event handlers, into browser-consumed output; synthesized xmlns:PREFIX declarations expose the same unchecked-name boundary. This issue is fixed in @xmldom/xmldom versions 0.8.14 and 0.9.11; no fixed version is available for xmldom.
Title xmldom: Attribute name injection via setAttribute() 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-03T17:35:55.385Z

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

Link: CVE-2026-83605

cve-icon Vulnrichment

Updated: 2026-09-03T17:35:24.457Z

cve-icon NVD

Status : Deferred

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

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

Link: CVE-2026-83605

cve-icon Redhat

Severity : Important

Publid Date: 2026-09-01T14:18:20Z

Links: CVE-2026-83605 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-02T04:15:05Z

Weaknesses
  • CWE-79

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

  • CWE-91

    XML Injection (aka Blind XPath Injection)