CVE-2022-39353
xmldom allows multiple root nodes in a DOM
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
1Exploited in Wild
-Decision
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`.
CVSS Scores
SSVC
- Decision:-
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
References (3)
URL | Tag | Source |
---|---|---|
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 |
URL | Date | SRC |
---|---|---|
https://github.com/jindw/xmldom/issues/150 | 2024-08-03 |
URL | Date | SRC |
---|
URL | Date | SRC |
---|
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
|