Improper Validation of Consistency within Input Affecting node-xmldom package, versions <0.8.6-1


Severity

Recommended
0.0
critical
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
1.28% (70th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-ECHOLATEST-NODEXMLDOM-19498273
  • published2 Sept 2026
  • disclosed2 Nov 2022

Introduced: 2 Nov 2022

CVE-2022-39353  (opens in a new tab)
CWE-1288  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

Upgrade Echo:latest node-xmldom to version 0.8.6-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream node-xmldom package and not the node-xmldom package as distributed by Echo. See How to fix? for Echo:latest relevant fixed versions and status.

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 documentElementor reject a document with a document that has more then 1 childNode.

CVSS Base Scores

version 3.1