Mozilla
CVE-2026-34601
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInject CDATA terminator ]]> into CDATASection node
-
DeliveryTrigger XMLSerializer serialization
-
ExploitEmit unescaped terminator as active XML
-
ExecutionInject malicious XML structure
-
ImpactManipulate downstream business logic
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization XPath query parameterization
|
| Exploitation Conditions | No special conditions — remote unauthenticated exploitation against @xmldom/xmldom library when attacker-controlled strings are inserted into CDATASection nodes and subsequently serialized via XMLSerializer. |
| Impact | The CVSS v3.1 score of 7.5 (High) reflects network-based attack vector (AV:N), low complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), and high integrity impact (I:H) with no confidentiality or availability impact. This scoring accurately represents the business-logic risk: attackers can inject arbitrary XML elements into generated documents that downstream systems trust, potentially manipulating workflows, permissions, or data integrity. However, real-world exploitability depends heavily on application architecture-the vulnerability only manifests when applications (1) accept untrusted input, (2) embed it in CDATA sections via xmldom, (3) serialize the document, and (4) pass the output to consumers that make security decisions based on XML structure. The attack is fully remote and unauthenticated wherever these conditions exist. No EPSS score is provided, but the availability of detailed proof-of-concept code (two working exploits in the advisory demonstrating both the direct createCDATASection path and mutation-based vectors) significantly lowers the barrier to exploitation. CISA KEV does not list this CVE, indicating no confirmed active exploitation at time of analysis. The technical impact is limited to integrity violation-no code execution or data exfiltration-but in contexts like SOAP APIs, XML-based authorization systems, or data export pipelines, injected elements like <role>admin</role> or <approved>true</approved> could have severe consequences. Organizations using xmldom to generate XML containing any user-controlled data should treat this as a priority patch, particularly in fintech, healthcare, or enterprise integration scenarios where XML carries business-critical semantics. |
| Exploit ScenarioDerived | An attacker targets a Node.js application that generates XML exports containing user profile data embedded in CDATA sections for compatibility with legacy XML consumers. The application accepts a user-supplied biography field and creates an XML document using |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 01, 2026
XML injection in xmldom's CDATA serialization allows remote attackers to inject arbitrary markup into generated XML documents without authentication. The vulnerability affects both the legacy xmldom package and @xmldom/xmldom when applications embed untrusted input into CDATA sections. Attackers can break out of CDATA context by including the sequence ]]> in user-controlled strings, causing downstream XML consumers to parse injected elements as legitimate markup. Vendor-released patches are avai
Earlier versions of this analysis (1)
XML injection in xmldom's CDATA serialization allows remote attackers to inject arbitrary markup into generated XML documents without authentication. The vulnerability affects both the legacy xmldom package and @xmldom/xmldom when applications embed untrusted input into CDATA sections. Attackers can break out of CDATA context by including the sequence ]]> in user-controlled strings, causing downstream XML consumers to parse injected elements as legitimate markup. Vendor-released patches are available in versions 0.8.12 and 0.9.9. EPSS data not provided; no confirmed active exploitation (CISA KEV status: not listed). Public proof-of-concept code exists in the GitHub security advisory.
RemediationAI
Upgrade to patched versions immediately: xmldom 0.8.12 or later for the legacy package, or @xmldom/xmldom 0.9.9 or later for the modern package. The fixes implement two complementary mitigations: Document.createCDATASection() now throws InvalidCharacterError when input contains the ]]> sequence (aligning with WHATWG DOM specification behavior), and XMLSerializer defensively splits any ]]> occurrences in CDATA data into the safe escaped sequence ]]]]><![CDATA[> during serialization. Applications relying on the previous permissive behavior where createCDATASection silently accepted ]]> will experience breaking changes and must handle the new exception or use mutation methods like appendData for legitimate use cases. Official patch commit is available at https://github.com/xmldom/xmldom/commit/2b852e836ab86dbbd6cbaf0537f584dd0b5ac184, with release notes at https://github.com/xmldom/xmldom/releases/tag/0.8.12 and https://github.com/xmldom/xmldom/releases/tag/0.9.9. Full advisory and migration guidance is published at https://github.com/xmldom/xmldom/security/advisories/GHSA-wh4c-j3r5-mjhp. No workarounds are recommended; patching is the only complete remediation. Organizations unable to immediately upgrade should audit all code paths where untrusted input flows into createCDATASection or CDATA node mutations and implement application-layer validation to reject strings containing ]]> until patches can be deployed.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
This vulnerability exploits improper handling of CDATA section terminators in the xmldom JavaScript XML parser library (both legacy npm/xmldom and modern @xmldom/xmldom packages). CDATA sections in XML allow text content that would otherwise require entity escaping (like < and &) to be written literally, bounded by <![CDATA[ and ]]> markers. The XML specification prohibits the sequence ]]> from appearing within CDATA content because it prematurely closes the section. The vulnerability stems from two implementation gaps in xmldom's DOM implementation (lib/dom.js): Document.createCDATASection() accepted any string without validating for the forbidden terminator, and XMLSerializer emitted CDATA node data verbatim (node.data wrapped in CDATA markers) without detecting or escaping embedded ]]> sequences. Additionally, mutation methods from the CharacterData interface (appendData, replaceData, insertData) and direct property assignments (.data, .textContent) could inject the terminator after node creation, bypassing any potential validation. The root cause maps to CWE-91 (XML Injection), where insufficient output encoding allows data to be reinterpreted as active markup. Notably, the SAX parser path was not vulnerable because its non-greedy regex correctly stopped at the first ]]> during parsing, but the serialization path created a roundtrip integrity failure.
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
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
2DescriptionCVE.org
Summary
@xmldom/xmldom allows attacker-controlled strings containing the CDATA terminator ]]> to be inserted into a CDATASection node. During serialization, XMLSerializer emitted the CDATA content verbatim without rejecting or safely splitting the terminator. As a result, data intended to remain text-only became active XML markup in the serialized output, enabling XML structure injection and downstream business-logic manipulation.
The sequence ]]> is not allowed inside CDATA content and must be rejected or safely handled during serialization. (MDN Web Docs)
Attack surface
Document.createCDATASection(data) is the most direct entry point, but it is not the only one. The WHATWG DOM spec intentionally does not validate ]]> in mutation methods - only createCDATASection carries that guard. The following paths therefore also allow ]]> to enter a CDATASection node and reach the serializer:
CharacterData.appendData()CharacterData.replaceData()CharacterData.insertData()- Direct assignment to
.data - Direct assignment to
.textContent
(Note: assigning to .nodeValue does not update .data in this implementation - the serializer reads .data directly - so .nodeValue is not an exploitable path.)
Parse path
Parsing XML that contains a CDATA section is not affected. The SAX parser's non-greedy CDSect regex stops at the first ]]>, so parsed CDATA data never contains the terminator.
---
Impact
If an application uses xmldom to generate "trusted" XML documents that embed untrusted user input inside CDATA (a common pattern in exports, feeds, SOAP/XML integrations, etc.), an attacker can inject additional XML elements/attributes into the generated document.
This can lead to:
- Integrity violation of generated XML documents.
- Business-logic injection in downstream consumers (e.g., injecting
<approved>true</approved>,<role>admin</role>, workflow flags, or other security-relevant elements). - Unexpected privilege/workflow decisions if downstream logic assumes injected nodes cannot appear.
This issue does not require malformed parsers or browser behavior; it is caused by serialization producing attacker-influenced XML markup.
---
Root Cause (with file + line numbers)
File: lib/dom.js
1. No validation in createCDATASection
createCDATASection: function (data) accepts any string and appends it directly.
- Lines 2216-2221 (0.9.8)
2. Unsafe CDATA serialization
Serializer prints CDATA sections as:
<![CDATA[ + node.data + ]]>without handling ]]> in the data.
- Lines 2919-2920 (0.9.8)
Because CDATA content is emitted verbatim, an embedded ]]> closes the CDATA section early and the remainder of the attacker-controlled payload is interpreted as markup in the serialized XML.
---
Proof of Concept - Fix A: createCDATASection now throws
On patched versions, passing ]]> directly to createCDATASection throws InvalidCharacterError instead of silently accepting the payload:
const { DOMImplementation } = require('./lib');
const doc = new DOMImplementation().createDocument(null, 'root', null);
try {
doc.createCDATASection('SAFE]]><injected attr="pwn"/>');
console.log('VULNERABLE - no error thrown');
} catch (e) {
console.log('FIXED - threw:', e.name); // InvalidCharacterError
}Expected output on patched versions:
FIXED - threw: InvalidCharacterError---
Proof of Concept - Fix B: mutation vector now safe
On patched versions, injecting ]]> via a mutation method (appendData, replaceData, .data =, .textContent =) no longer produces injectable output. The serializer splits the terminator so the result round-trips as safe text:
const { DOMImplementation, XMLSerializer } = require('./lib');
const { DOMParser } = require('./lib');
const doc = new DOMImplementation().createDocument(null, 'root', null);
// Start with safe data, then mutate to include the terminator
const cdata = doc.createCDATASection('safe');
doc.documentElement.appendChild(cdata);
cdata.appendData(']]><injected attr="pwn"/><more>TEXT</more><![CDATA[');
const out = new XMLSerializer().serializeToString(doc);
console.log('Serialized:', out);
const reparsed = new DOMParser().parseFromString(out, 'text/xml');
const injected = reparsed.getElementsByTagName('injected').length > 0;
console.log('Injected element found in reparsed doc:', injected);
// VULNERABLE: true | FIXED: falseExpected output on patched versions:
Serialized: <root><![CDATA[safe]]]]><![CDATA[><injected attr="pwn"/><more>TEXT</more><![CDATA[]]></root>
Injected element found in reparsed doc: false---
Fix Applied
Both mitigations were implemented:
Option A - Strict/spec-aligned: reject ]]> in createCDATASection()
Document.createCDATASection(data) now throws InvalidCharacterError (per the WHATWG DOM spec) when data contains ]]>. This closes the direct entry point.
Code that previously passed a string containing ]]> to createCDATASection and relied on the silent/unsafe behaviour will now receive InvalidCharacterError. Use a mutation method such as appendData if you intentionally need ]]> in a CDATASection node's data (the serializer split in Option B will keep the output safe).
Option B - Defensive serialization: split the terminator during serialization
XMLSerializer now replaces every occurrence of ]]> in CDATA section data with the split sequence ]]]]><![CDATA[> before emitting. This closes all mutation-vector paths that Option A alone cannot guard, and means the serialized output is always well-formed XML regardless of how ]]> entered the node.
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-34601 is a high-severity XML injection vulnerability in the xmldom and @xmldom/xmldom packages that allows unauthenticated attackers to inject malicious XML markup into documents when applications process untrusted input in CDATA sections. Organizations using these libraries to handle user-supplied data face risk of XML parsing manipulation, potentially leading to injection attacks against downstream systems that consume generated XML documents.
Apply vendor patch. If patching is delayed, implement input validation to block the CDATA escape sequence ']]>' in all user-controlled data before it reaches xmldom processing functions; however, this is not a complete mitigation and patching should be prioritized.
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
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Affected Products (CPE)CVE.org
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 allSame technique Code Injection
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
| 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 |
| openSUSE Leap 15.6 | 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 |
GHSA-wh4c-j3r5-mjhp
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB