CVE-2022-39353

Critical

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

SeverityCritical
CVSS9.4
Exploit probability—
ProductXmldom
PublishedNov 2, 2022
First seenNov 2, 2022

How to fix

Update
  • xmldom_project xmldom0.6.0, 0.7.7, 0.8.4 or later
  • @xmldom/xmldom0.7.7, 0.8.4, 0.9.0-beta.4 or later

Affected products

ProductAffected versionsFixed in
xmldom_project xmldomv < 0.6.0, 0.7.0 ≤ v < 0.7.7, 0.8.0 ≤ v < 0.8.4, 0.9.00.6.0, 0.7.7, 0.8.4
debian debian_linux10.0—
xmldomnpmv ≤ 0.6.0—
@xmldom/xmldomnpmv < 0.7.7, 0.8.0 ≤ v < 0.8.4, 0.9.0-beta.1 ≤ v < 0.9.0-beta.40.7.7, 0.8.4, 0.9.0-beta.4

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.