XML Injection Affecting @xmldom/xmldom package, versions >=0.9.0 <0.9.12


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.33% (26th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about XML Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-XMLDOMXMLDOM-19499073
  • published2 Sept 2026
  • disclosed1 Sept 2026
  • creditChristian Bewernitz

Introduced: 1 Sep 2026

NewCVE-2026-83609  (opens in a new tab)
CWE-91  (opens in a new tab)

How to fix?

Upgrade @xmldom/xmldom to version 0.9.12 or higher.

Overview

@xmldom/xmldom is a javascript ponyfill to provide the following APIs that are present in modern browsers to other runtimes. Since version 0.7.0 this package is published to npm as @xmldom/xmldom and no longer as xmldom

Affected versions of this package are vulnerable to XML Injection via the reg() function in lib/grammar.js, which compiled all anchored validation regexes with the m (multiline) flag. Because ^…$ anchors match per-line when m is set, a name or ID value containing an ECMAScript line terminator (U+000A, U+000D, U+2028, or U+2029) passes full-string validation as long as its first line is conformant, allowing arbitrary trailing markup to bypass well-formedness checks. An attacker can supply element names, attribute names, or DOCTYPE publicId/systemId values containing embedded line terminators to inject content that evades the validators enforced by createElementNS, createAttributeNS, createDocumentType, createAttribute, and serializeToString with requireWellFormed: true.

CVSS Base Scores

version 4.0
version 3.1