Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit malicious input with `?>` sequence
-
DeliveryApplication calls createProcessingInstruction(target, malicious_data)
-
ExploitSerializer emits PI as `<?target ?><injected_xml><?...?>`
-
ExecutionDownstream parser interprets injected nodes as valid markup
-
PersistApplication logic processes attacker-controlled elements
-
ImpactUnauthorized access or policy bypass achieved
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization XPath query parameterization
|
| Exploitation Conditions | The application must use @xmldom/xmldom versions prior to 0.8.13 (0.8.x branch) or versions 0.9.0-0.9.9 (0.9.x branch), or the unmaintained xmldom package ≤0.6.0. Exploitation requires the application to call |
| Impact | Real-world risk is moderate-to-high for applications using @xmldom/xmldom to serialize XML from untrusted input. CVSS 4.0 vector AV:N/AC:L/PR:N/UI:N indicates remote unauthenticated exploitation with low complexity, but scope is unchanged (S:X baseline) and only integrity is impacted (VI:H, VC:N/VA:N) - no confidentiality breach or availability disruption. No EPSS score provided; no CISA KEV listing, suggesting targeted rather than widespread exploitation. Publicly available exploit code exists (GitHub PoC from 2026-04-01, issue #987), lowering exploitation barrier. However, impact is constrained: attackers can only inject well-formed XML nodes, not execute code or access files directly. The RCE tag in metadata is misleading - this is XML structure manipulation, not remote code execution. Downstream risk depends entirely on how consuming applications process the injected nodes (e.g., SAML signature bypass, policy document tampering, XXE if parsers re-process output). CRITICAL CAVEAT: Patch is opt-in only. Applications that upgrade to 0.8.13/0.9.10 but do not pass |
| Exploit ScenarioDerived | An attacker submits malicious data to a web application that uses @xmldom/xmldom to generate XML configuration files. The application calls |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – May 07, 2026
XML node injection in @xmldom/xmldom allows remote unauthenticated attackers to inject arbitrary XML elements by embedding the processing instruction closing delimiter ?> in PI data. The serializer emits attacker-controlled data verbatim without escaping or validation, causing the remainder of the payload to be interpreted as active XML markup. Publicly available exploit code exists (GitHub PoC from April 2026). EPSS data not provided; CVSS 8.7 reflects high integrity impact (VI:H) with network vector and no authentication required. Patch available in versions 0.8.13+ and 0.9.10+ but requires opt-in requireWellFormed: true flag - default behavior remains vulnerable for backward compatibility.
Earlier versions of this analysis (1)
Processing instruction injection in @xmldom/xmldom allows attackers to break out of XML PI context and inject arbitrary markup by including the '?>' delimiter in PI data. When untrusted input is passed to createProcessingInstruction(), the serializer emits it verbatim without escaping, causing everything after '?>' to be parsed as live XML nodes instead of PI content. Vendor patch available in versions 0.8.13 (LTS) and 0.9.10+ but requires opt-in via {requireWellFormed: true} flag - default serialization behavior remains vulnerable. No active exploitation confirmed, no public weaponized exploit beyond disclosed PoC. This is a sibling vulnerability to the previously patched CDATA injection (CVE-2026-34601), affecting a different XML node type with the same delimiter-based injection pattern.
RemediationAI
Upgrade to @xmldom/xmldom version 0.8.13 or later (LTS branch) or version 0.9.10 or later (current branch). CRITICAL: The upgrade alone is insufficient. Developers must audit every call to XMLSerializer.serializeToString() and explicitly pass {requireWellFormed: true} as the second argument to enable injection guards. Example: new XMLSerializer().serializeToString(doc, {requireWellFormed: true}). Without this flag, the serializer continues to emit ?> verbatim for backward compatibility, leaving applications vulnerable. For the legacy xmldom package (≤0.6.0), no patch exists - migrate to @xmldom/xmldom 0.8.13+ or 0.9.10+. Compensating controls if upgrade is blocked: (1) Input validation - reject any untrusted input to createProcessingInstruction(target, data) or PI node .data property assignments if the string contains ?>. Trade-off: blocks legitimate use cases where ?> appears in non-XML content. (2) Output sanitization - regex-scan serialized XML for unexpected < characters within PI boundaries before passing to downstream consumers. Trade-off: performance overhead and complexity; fragile against encoding variations. (3) Least privilege - restrict XML generation to trusted code paths only; do not expose createProcessingInstruction or node mutation APIs to user-controlled workflows. Trade-off: architectural change. Patch commit reference: https://github.com/xmldom/xmldom/commit/7207a4b0e0bcc228868075ed991665ef9f73b1c2.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 4 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability resides in the W3C DOM implementation's handling of ProcessingInstruction nodes during XML serialization. Processing instructions in XML use <?target data?> syntax where ?> is a syntax-sensitive closing delimiter. The affected library (npm packages @xmldom/xmldom and legacy xmldom) stores PI data without validation in createProcessingInstruction() and later concatenates it directly into the output stream at serialization time (lib/dom.js line 2966). This mirrors CWE-91 (XML Injection) combined with improper neutralization of special elements. The root cause is delimiter-based injection in a syntax-constrained context - the same class previously fixed for CDATA sections (CVE-2026-34601) via delimiter splitting, but left unaddressed for PI nodes. The W3C DOM Parsing spec §3.2.1.7 requires well-formedness checks only when the require well-formed flag is true (default false), matching browser behavior (Chrome/Firefox/Safari emit ?> verbatim by default). CPE data identifies three affected npm packages: pkg:npm/@xmldom_xmldom (two version ranges), and the deprecated pkg:npm/xmldom (≤0.6.0, no fix available).
Know when Mozilla gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Primary rating from Vendor (https://github.com/xmldom/xmldom).
CVSS VectorVendor: https://github.com/xmldom/xmldom
Lifecycle Timeline
4DescriptionCVE.org
Summary
The package allows attacker-controlled processing instruction data to be serialized into XML without validating or neutralizing the PI-closing sequence ?>. As a result, an attacker can terminate the processing instruction early and inject arbitrary XML nodes into the serialized output.
---
Details
The issue is in the DOM construction and serialization flow for processing instruction nodes.
When createProcessingInstruction(target, data) is called, the supplied data string is stored directly on the node without validation. Later, when the document is serialized, the serializer writes PI nodes by concatenating <?, the target, a space, node.data, and ?> directly.
That behavior is unsafe because processing instructions are a syntax-sensitive context. The closing delimiter ?> terminates the PI. If attacker-controlled input contains ?>, the serializer does not preserve it as literal PI content. Instead, it emits output where the remainder of the payload is treated as live XML markup.
The same class of vulnerability was previously addressed for CDATA sections (GHSA-wh4c-j3r5-mjhp / CVE-2026-34601), where ]]> in CDATA data was handled by splitting. The serializer applies no equivalent protection to processing instruction data.
---
Affected code
lib/dom.js - createProcessingInstruction (lines 2240-2246):
createProcessingInstruction: function (target, data) {
var node = new ProcessingInstruction(PDC);
node.ownerDocument = this;
node.childNodes = new NodeList();
node.nodeName = node.target = target;
node.nodeValue = node.data = data;
return node;
},No validation is performed on data. Any string including ?> is stored as-is.
lib/dom.js - serializer PI case (line 2966):
case PROCESSING_INSTRUCTION_NODE:
return buf.push('<?', node.target, ' ', node.data, '?>');node.data is emitted verbatim. If it contains ?>, that sequence terminates the PI in the output stream and the remainder appears as active XML markup.
Contrast - CDATA (line 2945, patched):
case CDATA_SECTION_NODE:
return buf.push(g.CDATA_START, node.data.replace(/]]>/g, ']]]]><![CDATA[>'), g.CDATA_END);---
PoC
Minimal (from @tlsbollei report, 2026-04-01)
const { DOMImplementation, XMLSerializer } = require('@xmldom/xmldom');
const doc = new DOMImplementation().createDocument(null, 'r', null);
doc.documentElement.appendChild(
doc.createProcessingInstruction('a', '?><z/><?q ')
);
console.log(new XMLSerializer().serializeToString(doc));
// <r><?a ?><z/><?q ?></r>
// ^^^^ injected <z/> element is active markupWith re-parse verification (from @tlsbollei report)
const assert = require('assert');
const { DOMParser, XMLSerializer } = require('@xmldom/xmldom');
const doc = new DOMParser().parseFromString('<r/>', 'application/xml');
doc.documentElement.appendChild(doc.createProcessingInstruction('a', '?><z/><?q '));
const xml = new XMLSerializer().serializeToString(doc);
assert.strictEqual(new DOMParser().parseFromString(xml, 'application/xml')
.getElementsByTagName('z').length, 1); // passes - z is a real element---
Impact
An application that uses the package to build XML from untrusted input can be made to emit attacker-controlled elements outside the intended PI boundary. That allows the attacker to alter the meaning and structure of generated XML documents.
In practice, this can affect any workflow that generates XML and then stores it, forwards it, signs it, or hands it to another parser. Realistic targets include XML-based configuration, policy documents, and message formats where downstream consumers trust the serialized structure.
As noted by @tlsbollei: this is the same delimiter-driven XML injection bug class previously addressed by GHSA-wh4c-j3r5-mjhp for createCDATASection(). Fixing CDATA while leaving PI creation and PI serialization unguarded leaves the same standards-constrained issue open for another node type.
---
Disclosure
This vulnerability was publicly disclosed at 2026-04-06T11:25:07Z via xmldom/xmldom#987, which was subsequently closed without being merged.
---
Fix Applied
> ⚠ Opt-in required. Protection is not automatic. Existing serialization calls remain > vulnerable unless { requireWellFormed: true } is explicitly passed. Applications that pass > untrusted data to createProcessingInstruction() or mutate PI nodes with untrusted input > (via .data = or CharacterData mutation methods) should audit all serializeToString() > call sites and add the option.
XMLSerializer.serializeToString() now accepts an options object as a second argument. When { requireWellFormed: true } is passed, the serializer throws InvalidStateError before emitting any ProcessingInstruction node whose .data contains ?>. This check applies regardless of how ?> entered the node - whether via createProcessingInstruction directly or a subsequent mutation (.data =, CharacterData methods).
On @xmldom/xmldom ≥ 0.9.10, the serializer additionally applies the full W3C DOM Parsing §3.2.1.7 checks when requireWellFormed: true:
- Target check: throws
InvalidStateErrorif the PI target contains a:character or is an ASCII case-insensitive match for"xml". - Data Char check: throws
InvalidStateErrorif the PI data contains characters outside the XML Char production. - Data sequence check: throws
InvalidStateErrorif the PI data contains?>.
On @xmldom/xmldom ≥ 0.8.13 (LTS), only the ?> data check (check 3) is applied. The target and XML Char checks are not included in the LTS fix.
PoC - fixed path
const { DOMImplementation, XMLSerializer } = require('@xmldom/xmldom');
const doc = new DOMImplementation().createDocument(null, 'r', null);
doc.documentElement.appendChild(doc.createProcessingInstruction('a', '?><z/><?q '));
// Default (unchanged): verbatim - injection present
const unsafe = new XMLSerializer().serializeToString(doc);
console.log(unsafe);
// <r><?a ?><z/><?q ?></r>
// Opt-in guard: throws InvalidStateError before serializing
try {
new XMLSerializer().serializeToString(doc, { requireWellFormed: true });
} catch (e) {
console.log(e.name, e.message);
// InvalidStateError: The ProcessingInstruction data contains "?>"
}The guard catches ?> regardless of when it was introduced:
// Post-creation mutation: also caught at serialization time
const pi = doc.createProcessingInstruction('target', 'safe data');
doc.documentElement.appendChild(pi);
pi.data = 'safe?><injected/>';
new XMLSerializer().serializeToString(doc, { requireWellFormed: true });
// InvalidStateError: The ProcessingInstruction data contains "?>"Why the default stays verbatim
The W3C DOM Parsing and Serialization spec §3.2.1.3 defines a require well-formed flag whose default value is false. With the flag unset, the spec explicitly permits serializing PI data verbatim. This matches browser behavior: Chrome, Firefox, and Safari all emit ?> in PI data verbatim by default without error.
Unconditionally throwing would be a behavioral breaking change with no spec justification. The opt-in requireWellFormed: true flag allows applications that require injection safety to enable strict mode without breaking existing code.
Residual limitation
createProcessingInstruction(target, data) does not validate data at creation time. The WHATWG DOM spec (§4.5 step 2) mandates an InvalidCharacterError when data contains ?>; enforcing this check unconditionally at creation time is a breaking change and is deferred to a future breaking release.
When the default serialization path is used (without requireWellFormed: true), PI data containing ?> is still emitted verbatim. Applications that do not pass requireWellFormed: true remain exposed.
Blast Radius
ecosystem impact- 4 npm packages depend on @xmldom/xmldom (4 direct, 0 indirect)
- 2,019 npm packages depend on xmldom (864 direct, 1,181 indirect)
Ecosystem-wide dependent count for version 0.9.0 and other introduced versions.
Executive ViewAI
CVE-2026-41675 affects @xmldom/xmldom library versions before 0.8.13 and 0.9.10, enabling remote attackers to inject malicious XML elements into processed documents without authentication. Organizations using this library in web applications, API services, or data processing pipelines face data integrity compromise and potential downstream system manipulation through XML payload injection.
If immediate upgrade is blocked: implement input validation to reject XML processing instructions (PI) containing ?> delimiters before passing to xmldom serializer; apply Web Application Firewall (WAF) rules to block requests with malformed PI syntax patterns; restrict xmldom library usage to trusted internal data sources only and disable external XML parsing. Apply vendor patch as primary remediation.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
The PDF reader in Mozilla Firefox before 39.0.3, Firefox ESR 38.x before 38.1.1, and Firefox OS before 2.2 allows remote
Mozilla Firefox before 22.0, Firefox ESR 17.x before 17.0.7, Thunderbird before 17.0.7, and Thunderbird ESR 17.x before
Mozilla Firefox before 18.0, Firefox ESR 10.x before 10.0.12 and 17.x before 17.0.2, Thunderbird before 17.0.2, Thunderb
Use-after-free vulnerability in the serializeToStream implementation in the XMLSerializer component in Mozilla Firefox b
The Chrome Object Wrapper (COW) implementation in Mozilla Firefox before 16.0, Firefox ESR 10.x before 10.0.8, Thunderbi
The crypto.generateCRMFRequest function in Mozilla Firefox before 23.0, Firefox ESR 17.x before 17.0.8, Thunderbird befo
An issue was discovered in the Cisco WebEx Extension before 1.0.7 on Google Chrome, the ActiveTouch General Plugin Conta
The XrayWrapper implementation in Mozilla Firefox before 35.0 and SeaMonkey before 2.32 does not properly interact with
The Chrome Object Wrapper (COW) implementation in Mozilla Firefox before 18.0, Firefox ESR 17.x before 17.0.2, Thunderbi
The Web IDL implementation in Mozilla Firefox before 28.0, Firefox ESR 24.x before 24.4, Thunderbird before 24.4, and Se
Mozilla Firefox before 28.0, Firefox ESR 24.x before 24.4, Thunderbird before 24.4, and SeaMonkey before 2.25 allow remo
The Firefox sandbox in Adobe Flash Player before 10.3.183.67 and 11.x before 11.6.602.171 on Windows and Mac OS X, and b
Same weakness CWE-91 – XML Injection (aka Blind XPath Injection)
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| SUSE Linux Enterprise Desktop 15 SP7 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Fixed |
| SUSE Linux Enterprise Server 15 SP7 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP6 | Fixed |
| SUSE Linux Enterprise Module for Server Applications 15 SP4 | Fixed |
| SUSE Linux Enterprise Module for Server Applications 15 SP5 | Fixed |
| SUSE Linux Enterprise Server 15 SP4 | Fixed |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP5 | Fixed |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP6 | Fixed |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Fixed |
| SUSE Manager Proxy 4.3 | Fixed |
| SUSE Manager Proxy LTS 4.3 | Fixed |
| SUSE Manager Retail Branch Server 4.3 | Fixed |
| SUSE Manager Retail Branch Server LTS 4.3 | Fixed |
| SUSE Manager Server 4.3 | Fixed |
| SUSE Manager Server LTS 4.3 | Fixed |
| SUSE CaaS Platform 4.0 | Fixed |
| SUSE Enterprise Storage 6 | Fixed |
| SUSE Enterprise Storage 7 | Fixed |
| SUSE Enterprise Storage 7.1 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP6 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP1 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP1-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP2 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP2-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP2-LTSS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP3 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP3-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Fixed |
| SUSE Linux Enterprise Module for Server Applications 15 SP1 | Fixed |
| SUSE Linux Enterprise Module for Server Applications 15 SP2 | Fixed |
| SUSE Linux Enterprise Module for Server Applications 15 SP3 | Fixed |
| SUSE Linux Enterprise Real Time 15 SP2 | Fixed |
| SUSE Linux Enterprise Real Time 15 SP3 | Fixed |
| SUSE Linux Enterprise Real Time 15 SP4 | Fixed |
| SUSE Linux Enterprise Server 15 SP1 | Fixed |
| SUSE Linux Enterprise Server 15 SP1-BCL | Fixed |
| SUSE Linux Enterprise Server 15 SP1-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP2 | Fixed |
| SUSE Linux Enterprise Server 15 SP2-BCL | Fixed |
| SUSE Linux Enterprise Server 15 SP2-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP3 | Fixed |
| SUSE Linux Enterprise Server 15 SP3-BCL | Fixed |
| SUSE Linux Enterprise Server 15 SP3-LTSS | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP1 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP2 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP3 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Fixed |
| SUSE Manager Proxy 4.0 | Fixed |
| SUSE Manager Proxy 4.1 | Fixed |
| SUSE Manager Proxy 4.2 | Fixed |
| SUSE Manager Retail Branch Server 4.0 | Fixed |
| SUSE Manager Retail Branch Server 4.1 | Fixed |
| SUSE Manager Retail Branch Server 4.2 | Fixed |
| SUSE Manager Server 4.0 | Fixed |
| SUSE Manager Server 4.1 | Fixed |
| SUSE Manager Server 4.2 | Fixed |
| openSUSE Leap 15.3 | Fixed |
| openSUSE Leap 15.4 | Fixed |
| openSUSE Leap 15.5 | Fixed |
EUVD-2026-28290
GHSA-x6wf-f3px-wcqx
NVD
CVE.org
EPSS
VulDB
Exploit-DB