// For flags

CVE-2022-39353

xmldom allows multiple root nodes in a DOM

Severity Score

9.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

1
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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

xmldom es un módulo `DOMParser` y `XMLSerializer` basado en el estándar W3C de JavaScript puro (XML DOM Level 2 Core). xmldom analiza XML que no está bien formado porque contiene múltiples elementos de nivel superior y agrega todos los nodos raíz a la colección `childNodes` del `Documento`, sin informar ningún error ni arrojar. Esto rompe la suposición de que solo hay un nodo raíz en el árbol, lo que llevó a la emisión de CVE-2022-39299, ya que es un problema potencial para los dependientes. Actualice a @xmldom/xmldom@~0.7.7, @xmldom/xmldom@~0.8.4 (dist-tag más reciente) o @xmldom/xmldom@>=0.9.0-beta.4 (dist-tag siguiente). Como workaround, utilice uno de los siguientes enfoques según su caso de uso: en lugar de buscar elementos en todo el DOM, solo busque en `documentElement` o rechace un documento con un documento que tenga más de 1 `childNode`.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-09-02 CVE Reserved
  • 2022-11-02 CVE Published
  • 2024-06-23 EPSS Updated
  • 2024-08-03 CVE Updated
  • 2024-08-03 First Exploit
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-20: Improper Input Validation
  • CWE-1288: Improper Validation of Consistency within Input
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Xmldom Project
Search vendor "Xmldom Project"
Xmldom
Search vendor "Xmldom Project" for product "Xmldom"
< 0.6.0
Search vendor "Xmldom Project" for product "Xmldom" and version " < 0.6.0"
node.js
Affected
Xmldom Project
Search vendor "Xmldom Project"
Xmldom
Search vendor "Xmldom Project" for product "Xmldom"
>= 0.7.0 < 0.7.7
Search vendor "Xmldom Project" for product "Xmldom" and version " >= 0.7.0 < 0.7.7"
node.js
Affected
Xmldom Project
Search vendor "Xmldom Project"
Xmldom
Search vendor "Xmldom Project" for product "Xmldom"
>= 0.8.0 < 0.8.4
Search vendor "Xmldom Project" for product "Xmldom" and version " >= 0.8.0 < 0.8.4"
node.js
Affected
Xmldom Project
Search vendor "Xmldom Project"
Xmldom
Search vendor "Xmldom Project" for product "Xmldom"
0.9.0
Search vendor "Xmldom Project" for product "Xmldom" and version "0.9.0"
beta1, node.js
Affected
Xmldom Project
Search vendor "Xmldom Project"
Xmldom
Search vendor "Xmldom Project" for product "Xmldom"
0.9.0
Search vendor "Xmldom Project" for product "Xmldom" and version "0.9.0"
beta2, node.js
Affected
Xmldom Project
Search vendor "Xmldom Project"
Xmldom
Search vendor "Xmldom Project" for product "Xmldom"
0.9.0
Search vendor "Xmldom Project" for product "Xmldom" and version "0.9.0"
beta3, node.js
Affected
Debian
Search vendor "Debian"
Debian Linux
Search vendor "Debian" for product "Debian Linux"
10.0
Search vendor "Debian" for product "Debian Linux" and version "10.0"
-
Affected