CVE-2022-39353: xmldom - XML Parsing Issue
- Cve: CVE-2022-39353
- Name: xmldom - XML Parsing Issue
- Description: xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) `DOMParser` and `XMLSerializer` module. xmldom parses XML that is not well-formed because it contains multiple top level elements, and adds all root nodes to the `childNodes` collection of the `Document`, without reporting any error or throwing. This breaks the assumption that there is only a single root node in the tree, which led to issuance of CVE-2022-39299 as it is a potential issue for dependents. Update to @xmldom/xmldom@~0.7.7, @xmldom/xmldom@~0.8.4 (dist-tag latest) or @xmldom/xmldom@>=0.9.0-beta.4 (dist-tag next). As a workaround, please one of the following approaches depending on your use case: instead of searching for elements in the whole DOM, only search in the `documentElement`or reject a document with a document that has more then 1 `childNode`.
- Impact: Malformed XML can lead to unexpected behavior or security issues in applications relying on xmldom's parsing.
- Remediation: Update to @xmldom/xmldom@~0.7.7, ~0.8.4, or >=0.9.0-beta.4. Alternatively, validate XML to have only one root element before parsing.
- Requirement type: none
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.01559
- Epss percentile: 0.75869
- Assignee: [email protected]
- Published at: 2022-11-02T17:15:17Z
- Age in days: 1483
- Modified at: 2026-06-17T04:58:12Z
- Patch available: yes
- Public exploits total: 1
- References total: 3
- Products total: 2
- Oss: yes
- Projects total: 2
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-39353
- Nvd status: modified
- Checked, none or zero: vulnerability impact, known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: vulnerability type, requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-20 | Improper Input Validation |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/jindw/xmldom/issues/150 | nvd | 2022-11-02 |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://github.com/jindw/xmldom/issues/150 | Exploit, Issue Tracking, Third Party Advisory |
| https://github.com/xmldom/xmldom/security/advisories/GHSA-crh6-fp67-6883 | Third Party Advisory |
| https://lists.debian.org/debian-lts-announce/2023/01/msg00000.html | Mailing List, Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| xmldom_project:xmldom | = 0.9.0 beta3; = 0.9.0 beta2; = 0.9.0 beta1; >= 0.8.0, < 0.8.4; >= 0.7.0, < 0.7.7; < 0.6.0 | no | nvd | /v1/products/xmldom_project/xmldom |
| debian:debian_linux | = 10.0 | no | nvd | /v1/products/debian/debian_linux |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| jindw/xmldom | issues | yes | /v1/repositories/jindw/xmldom |
| xmldom/xmldom | commit, fix, package, releases, security_advisory | yes | /v1/repositories/xmldom/xmldom |
Index
- Repositories: 95
- Repositories high signal: 43
- Packages: 2
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2022-11-02
- Remote: yes
- Exposed hosts: 4739835
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports