Description
xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. From 0.9.10 until 0.9.12, the requireWellFormed: true serializer validates DocumentType.publicId and DocumentType.systemId with PubidLiteral_match and SystemLiteral_match expressions produced by reg() in lib/grammar.js, which inherit the multiline flag. A complete valid literal on the first line can therefore satisfy the matcher while U+000A, U+000D, U+2028, or U+2029 and breakout markup remain in the emitted <!DOCTYPE ...> declaration. This bypasses the strict-serialization mitigation for the earlier DocumentType injection advisory; creation and direct property assignment remain unvalidated by design. 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: Potential DOM injection leading to cross‑site scripting or code execution
Action: Upgrade
AI Analysis

Impact

The xmldom library, a pure JavaScript implementation of the W3C XML DOM Level 2 Core, failed to enforce strict well‑formedness checks on the DocumentType publicId and systemId fields between releases 0.9.10 and 0.9.12. It used multiline‑enabled regular expression literals, allowing an attacker to embed line terminators such as U+000A, U+000D, U+2028, or U+2029 into a publicId or systemId that passes the matcher yet still contains additional markup. This bypass enables a serialized <!DOCTYPE …> declaration to contain injected markup that can be interpreted by downstream consumers, potentially leading to DOM injection, cross‑site scripting, or other code execution attacks. The flaw is an example of improper input validation (CWE‑91) and an uncontrolled use of user input in serialization (CWE‑625).

Affected Systems

Any deployment relying on the xmldom npm package, specifically those using versions 0.9.10 or 0.9.11 (i.e., any release preceding 0.9.12). Users who upgraded to a version later than 0.9.12 are not affected by the described flaw.

Risk and Exploitability

The CVSS score is 8.7, indicating a high‑severity vulnerability. EPSS is currently unavailable, so the likelihood of exploitation is uncertain, but the absence of a KEV listing suggests no confirmed widespread exploitation as of now. The flaw is exploitable when an attacker can control or influence the XML input that is serialized, for example through an API that accepts user‑supplied XML. The attack vector is likely local or remote depending on how the xmldom instance is used, and the vulnerability requires the impacted library to perform serialization—an operation generally available to application developers or services ingesting XML. The validator’s misuse of multiline regexes constitutes a type of improper input validation (CWE‑91) that permits injection of malicious markup.

Generated by OpenCVE AI on September 1, 2026 at 17:02 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade xmldom to version 0.9.12 or later to apply the patched regex handling
  • Validate any XML payloads before parsing or serializing, rejecting malformed or unexpected DocumentType declarations
  • If possible, disable or neutralize external entity processing and other optional XML features that can be abused by attackers

Generated by OpenCVE AI on September 1, 2026 at 17:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-vr34-hp96-76pp xmldom: requireWellFormed DocType publicId/systemId validation is bypassable via an embedded line terminator
History

Fri, 04 Sep 2026 02:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


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

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


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 15:00: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.10 until 0.9.12, the requireWellFormed: true serializer validates DocumentType.publicId and DocumentType.systemId with PubidLiteral_match and SystemLiteral_match expressions produced by reg() in lib/grammar.js, which inherit the multiline flag. A complete valid literal on the first line can therefore satisfy the matcher while U+000A, U+000D, U+2028, or U+2029 and breakout markup remain in the emitted <!DOCTYPE ...> declaration. This bypasses the strict-serialization mitigation for the earlier DocumentType injection advisory; creation and direct property assignment remain unvalidated by design. This issue is fixed in @xmldom/xmldom version 0.9.12.
Title xmldom: requireWellFormed DocType publicId/systemId validation is bypassable via an embedded line terminator
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-04T01:59:23.360Z

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

Link: CVE-2026-83618

cve-icon Vulnrichment

Updated: 2026-09-04T01:59:18.317Z

cve-icon NVD

Status : Deferred

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

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

Link: CVE-2026-83618

cve-icon Redhat

Severity : Important

Publid Date: 2026-09-01T14:49:46Z

Links: CVE-2026-83618 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-01T17:15:05Z

Weaknesses
  • CWE-625

    Permissive Regular Expression

  • CWE-91

    XML Injection (aka Blind XPath Injection)