# CVE-2022-39353: node-xmldom: xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) `DOMParser` and `XMLSerializer` module

CVE-2022-39353 is fixed in node-xmldom on 1 platform, first by node-xmldom 0.1.27+ds-1+deb10u2build0.20.04.1, released November 2, 2022. It is not reported as exploited. Patch Radar priority: Urgent.

- Web page: https://patchblox.com/security/cve/CVE-2022-39353
- Priority: Urgent
- CVSS: 9.8 (critical)
- EPSS: 0.0156
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Nov 2, 2022

## 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`.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | node-xmldom Debian 12.15 (bookworm) | 0.8.6-1 | [DEBIAN-CVE-2022-39353](https://patchblox.com/security/data/fix/linux/debian-cve-2022-39353.md) | Nov 2, 2022 |
| Linux | node-xmldom Debian 13.5 (trixie) | 0.8.6-1 | [DEBIAN-CVE-2022-39353](https://patchblox.com/security/data/fix/linux/debian-cve-2022-39353.md) | Nov 2, 2022 |
| Linux | node-xmldom Debian 14 | 0.8.6-1 | [DEBIAN-CVE-2022-39353](https://patchblox.com/security/data/fix/linux/debian-cve-2022-39353.md) | Nov 2, 2022 |
| Linux | node-xmldom Ubuntu 20.04 LTS (focal) | 0.1.27+ds-1+deb10u2build0.20.04.1 | [node-xmldom 0.1.27+ds-1+deb10u2build0.20.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-node-xmldom-0.1.27-ds-1-deb10u2build0.20.04.1.md) | Nov 2, 2022 |
| Linux | node-xmldom Ubuntu 22.04.1 LTS (jammy) | 0.7.5-1ubuntu0.22.04.1 | [node-xmldom 0.7.5-1ubuntu0.22.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-node-xmldom-0.7.5-1ubuntu0.22.04.1.md) | Nov 2, 2022 |

---

Data as of 2026-11-08T06:59:42Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
