ZeroHour

CVE-2026-83617

niche

Multiline Regex Bypass in @xmldom/xmldom Enables Strict-Mode XML Injection

CVSS 4.0
8.7 high
EPSS
<1%p26
Published
()
Modified
AI analysis

@xmldom/xmldom 0.9.11 contains a flaw in its strict serialization mode: when requireWellFormed is set to true, element and attribute name validation uses the anchored QName_exact regular expression produced by reg() in lib/grammar.js, which inherits the multiline flag, so the anchors match at embedded line boundaries rather than only at the ends of the name. As a result, a name whose first line is valid but that is followed by a line terminator (U+000A, U+000D, U+2028, or U+2029) and breakout markup passes validation and is emitted verbatim into element start tags, end tags, or attribute names, enabling XML markup injection (CWE-91) that bypasses the strict-serialization checks added in response to earlier element-name and attribute-name injection advisories. An attacker who can influence names in parsed XML, for example by supplying an untrusted document that an application re-serializes, gains integrity impact, consistent with the CVSS 4.0 score of 8.7 with high integrity impact and no confidentiality or availability impact. Only consumers of @xmldom/xmldom 0.9.11 on npm that enable the requireWellFormed: true strict-serialization setting are affected, and the default serialization path remains outside the strict guarantee. No exploitation is known: there is no public proof of concept, the issue is not in CISA KEV, and EPSS estimates a 0.3% probability of exploitation in the next 30 days.

What to do: Upgrade @xmldom/xmldom to 0.9.12 or later, including transitive copies (check with npm ls @xmldom/xmldom or your software-composition-analysis tooling). Until upgraded, do not rely on requireWellFormed: true strict serialization for attacker-influenced documents, or strip or reject names containing U+000A, U+000D, U+2028, or U+2029 before serialization. Note that the default serialization path was never covered by the strict guarantee, so do not treat its output as strictly validated regardless of version.

Affected
xmldom project @xmldom/xmldom (npm)>=0.9.11, <0.9.12 (i.e., 0.9.11; fixed in 0.9.12)
Estimated exposure
nichelikely no more than a few thousand applications (single vulnerable release 0.9.11; additionally requires the non-default requireWellFormed: true… — The vulnerable range covers only one release (0.9.11), and exposure further requires the opt-in requireWellFormed: true setting rather than the default serialization path, so only a small slice of this widely used npm package's user base…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. From 0.9.11 until 0.9.12, the requireWellFormed: true element and attribute name checks use the anchored QName_exact expression produced by reg() in lib/grammar.js, which inherits the multiline flag. A name with a valid first line followed by U+000A, U+000D, U+2028, or U+2029 and breakout markup therefore passes validation and is emitted verbatim in element start and end tags or attribute names. This bypasses the strict-serialization checks introduced for the earlier element-name and attribute-name injection advisories, while the default serialization path remains outside the strict guarantee. This issue is fixed in @xmldom/xmldom version 0.9.12.

Ecosystems
npm
Weakness
CWE-91, CWE-625
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
GHSA
GHSA-jxjr-3g7g-3944 (high)

In the news

No ingested article mentions this CVE yet.