CVE-2026-83608

xmldom: DocType `name` Injection Bypasses requireWellFormed

Published Sep 1, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
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.15 and 0.9.12, and in xmldom version 0.6.0 and earlier, the DOCUMENT_TYPE_NODE branch in lib/dom.js validates publicId, systemId, and internalSubset under requireWellFormed: true but emits DocumentType.name verbatim. A name containing > or whitespace can terminate the <!DOCTYPE ...> declaration and inject sibling markup; the value can be supplied through createDocumentType() on the 0.8.x and unscoped lines or through a direct DocumentType.name property write on every affected line. The default path and legacy creation-time behavior remain permissive, while the vulnerable strict path fails to enforce an XML Name. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.

Analysis

AI-generated

Technical impact

The vulnerability arises when xmldom parses a Document Type declaration whose name contains an invalid XML character. The library accepts a name containing the character ">" or whitespace, which terminates the <!DOCTYPE ...> declaration and injects arbitrary sibling markup that can contain malicious HTML or JavaScript. This flaw enables an attacker to supply crafted XML that injects execution code into the parsed DOM, potentially leading to cross‑site scripting attacks.

Affected Systems

The susceptible library is the pure‐JavaScript XML DOM parser xmldom, distributed under the @xmldom:xmldom name. All versions of @xmldom/xmldom prior to 0.8.15 and prior to 0.9.12, as well as the legacy xmldom package version 0.6.0 and earlier, are affected. No patched release exists for the older xmldom package.

Risk and Exploitability

The CVSS score of 8.7 indicates a high severity flaw. EPSS is not available and the vulnerability is not listed in CISA KEV. The attacker must provide or control XML input that is parsed by xmldom. If untrusted XML is processed client‑side or server‑side, the attacker can construct a DocType name embedding disallowed characters, causing the library to emit a self‑terminating declaration and inject malicious payload directly into the DOM. The path to exploitation is straightforward and requires no special privileges beyond input control.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade @xmldom/xmldom to version 0.8.15 or 0.9.12.
  • If your project uses the older xmldom package (version 0.6.0 or earlier) and a patch is unavailable, migrate to a supported XML parsing library or a later version of the library if compatible.
  • When upgrading is not immediately possible, validate the DocType name before parsing by rejecting or sanitizing any name that contains the character " > " or whitespace.
  • Avoid creating a DocumentType via createDocumentType() or directly assigning to DocumentType.name when handling untrusted XML data.
  • Regularly audit deployments for unexpected injected markup and monitor application behavior for XSS indicators.

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

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-27p8-2357-5qqv xmldom: DocType `name` Injection Bypasses requireWellFormed
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Important

Type Values Removed Values Added
First Time appeared Xmldom
Xmldom xmldom
Vendors & Products Xmldom
Xmldom xmldom
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.15 and 0.9.12, and in xmldom version 0.6.0 and earlier, the DOCUMENT_TYPE_NODE branch in lib/dom.js validates publicId, systemId, and internalSubset under requireWellFormed: true but emits DocumentType.name verbatim. A name containing > or whitespace can terminate the <!DOCTYPE ...> declaration and inject sibling markup; the value can be supplied through createDocumentType() on the 0.8.x and unscoped lines or through a direct DocumentType.name property write on every affected line. The default path and legacy creation-time behavior remain permissive, while the vulnerable strict path fails to enforce an XML Name. This issue is fixed in @xmldom/xmldom versions 0.8.15 and 0.9.12; no fixed version is available for xmldom.
Title xmldom: DocType `name` Injection 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'}

Weaknesses
  • CWE-91

    XML Injection (aka Blind XPath Injection)

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 4, 2026, 1:56 AM
Reserved
Aug 31, 2026, 8:36 PM
Status
Deferred
Published
Sep 1, 2026, 3:17 PM
Modified
Sep 8, 2026, 9:11 PM
Severity
Important
Public date
Sep 1, 2026, 2:27 PM