Incorrect DOM interpretation via multiple root elements
Published Nov 2, 2022 · Updated Apr 22, 2025
Improper input validation in xmldom allows attackers to create malformed DOM trees by supplying XML with multiple top-level elements. DOMParser inserts every top-level element into Document.childNodes instead of rejecting content after the first root, leaving documentElement anchored to only one root. Exploitation requires a consuming application to accept attacker-controlled XML and trust document-wide DOM searches, which can select nodes outside documentElement and violate application security assumptions.
Summary
What happened
Improper input validation in xmldom allows attackers to create malformed DOM trees by supplying XML with multiple top-level elements. DOMParser inserts every top-level element into Document.childNodes instead of rejecting content after the first root, leaving documentElement anchored to only one root. Exploitation requires a consuming application to accept attacker-controlled XML and trust document-wide DOM searches, which can select nodes outside documentElement and violate application security assumptions.
The record
- CVE
- CVE-2022-39353
- Published
- Nov 2, 2022
- Updated
- Apr 22, 2025
- Vendor
- xmldom
- Product
- xmldom
- Classifications
- CWE-20, CWE-1288
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Nov 2, 2022CVE publishedPublication date reported by the CVE source.
- Apr 22, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=<= 0.6.0
- Affected versionversion=< 0.7.7
- Affected versionversion=>= 0.8.0, < 0.8.4
- Affected versionversion=>= 0.9.0-beta.1, < 0.9.0-beta.4
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Multiple-root XML reproductionproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo