CVE-2022-39353
xmldom allows multiple root nodes in a DOM
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.4
xmldom allows multiple root nodes in a DOM
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.
- Record
CVE-2022-39353- CVSS 3.1
- 9.4 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - Weakness
- CWE-20, CWE-1288
- Updated
- 2026-11-02
EUVDEUVD-2022-7316
9.4
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.
- Record
EUVD-2022-7316- CVSS 3.1
- 9.4 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-crh6-fp67-6883
9.8
xmldom allows multiple root nodes in a DOM
Impact
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 https://nvd.nist.gov/vuln/detail/CVE-2022-39299 and is a potential issue for dependents.
Patches
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).
Workarounds
One of the following approaches might help, depending on your use case:
- Instead of searching for elements in the whole DOM, only search in the
documentElement. - Reject a document with a document that has more then 1
childNode.
References
For more information
If you have any questions or comments about this advisory:
- Email us at [email protected]
- Record
GHSA-crh6-fp67-6883- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-20, CWE-1288
- Updated
- 2026-11-02
NVD
9.4
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.
- Record
CVE-2022-39353- CVSS 3.1
- 9.4 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-20, CWE-1288
- Updated
- 2026-11-02
OSVAZL-38671
9.8
CVE-2022-39353 affecting package python-tensorboard for versions less than 2.16.2-1
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.
- Record
AZL-38671- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSV
9.4
xmldom allows multiple root nodes in a DOM
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.
- Record
CVE-2022-39353- CVSS 3.1
- 9.4 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - Weakness
- CWE-1288, CWE-20
- Updated
- 2026-11-02
Show 6 moreShow less
OSVDEBIAN-CVE-2022-39353
9.8
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.
- Record
DEBIAN-CVE-2022-39353- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
OSVGHSA-crh6-fp67-6883
9.8
xmldom allows multiple root nodes in a DOM
Impact
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 https://nvd.nist.gov/vuln/detail/CVE-2022-39299 and is a potential issue for dependents.
Patches
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).
Workarounds
One of the following approaches might help, depending on your use case:
- Instead of searching for elements in the whole DOM, only search in the
documentElement. - Reject a document with a document that has more then 1
childNode.
References
For more information
If you have any questions or comments about this advisory:
- Email us at [email protected]
- Record
GHSA-crh6-fp67-6883- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-1288, CWE-20
- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2022-39353
9.8
CVE-2022-39353 in @xmldom/xmldom - Patched by Root
Root has patched CVE-2022-39353 in the @xmldom/xmldom package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2022-39353- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-06
OSVUBUNTU-CVE-2022-39353
9.4
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.
- Record
UBUNTU-CVE-2022-39353- CVSS 3.1
- 9.4 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2026-1793867503 No score
TuxCare security update for xmldom (2 CVEs)
TuxCare rebuilt xmldom to address 2 CVEs. Fixed in 0.1.31-tuxcare.8.
- Record
CLSA-2026-1793867503- Updated
- 2026-11-05
OSVUSN-6102-1 No score
node-xmldom vulnerabilities
It was discovered that xmldom incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to cause unexpected syntactic changes during XML processing. This issue only affected Ubuntu 20.04 LTS. (CVE-2021-21366)
It was discovered that xmldom incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to cause a denial of service. (CVE-2022-37616, CVE-2022-39353)
- Record
USN-6102-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
xmldomnpm |
through 0.6.0 | None known |
@xmldom/xmldomnpm |
before 0.7.7 | 0.7.7 |
@xmldom/xmldomnpm |
0.8.0 up to 0.8.4 | 0.8.4 |
@xmldom/xmldomnpm |
0.9.0-beta.1 up to 0.9.0-beta.4 | 0.9.0-beta.4 |
python-tensorboardAzure Linux:3 |
before 2.16.2-1 | 2.16.2-1 |
xmldomTuxCare:npm From an advisory covering 2 CVEs |
0.1.31-tuxcare.0 up to 0.1.31-tuxcare.8, plus listed versions 0.1.310.1.31-tuxcare.10.1.31-tuxcare.20.1.31-tuxcare.30.1.31-tuxcare.40.1.31-tuxcare.50.1.31-tuxcare.60.1.31-tuxcare.7 |
0.1.31-tuxcare.8 |
node-xmldomDebian:12 |
before 0.8.6-1 | 0.8.6-1 |
node-xmldomDebian:13 |
before 0.8.6-1 | 0.8.6-1 |
node-xmldomDebian:14 |
before 0.8.6-1 | 0.8.6-1 |
node-xmldomDebian:10 From an advisory covering 2 CVEs |
before 0.1.27+ds-1+deb10u2, plus listed versions 0.1.27+ds-10.1.27+ds-1+deb10u1 |
0.1.27+ds-1+deb10u2 |
Show 7 moreShow less
| Package | Affected | Fixed |
|---|---|---|
@xmldom/xmldomRoot:npm |
before 0.7.5-aikido.2 | 0.7.5-aikido.2 |
@rootio/xmldom__xmldomRoot:npm |
before 0.7.5-root.io.2 | 0.7.5-root.io.2 |
node-xmldomUbuntu:20.04:LTS |
before 0.1.27+ds-1+deb10u2build0.20.04.1, plus listed versions 0.1.27+ds-1 |
0.1.27+ds-1+deb10u2build0.20.04.1 |
node-xmldomUbuntu:22.04:LTS |
before 0.7.5-1ubuntu0.22.04.1, plus listed versions 0.5.0-10.7.3-10.7.5-1 |
0.7.5-1ubuntu0.22.04.1 |
node-xmldomUbuntu:25.10 |
All versions, plus listed versions 0.9.6-1 |
None known |
node-xmldomUbuntu:20.04:LTS From an advisory covering 3 CVEs |
before 0.1.27+ds-1+deb10u2build0.20.04.1, plus listed versions 0.1.27+ds-1 |
0.1.27+ds-1+deb10u2build0.20.04.1 |
node-xmldomUbuntu:22.04:LTS From an advisory covering 3 CVEs |
before 0.7.5-1ubuntu0.22.04.1, plus listed versions 0.5.0-10.7.3-10.7.5-1 |
0.7.5-1ubuntu0.22.04.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases | OSV | |
| affected | ||
| affected, aliases, facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-39353 is a critical vulnerability (CVSS 9.4) in Xmldom, published November 1, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.56%, the 75th percentile. Fixed in @xmldom/xmldom 0.7.7.
References
github.com/xmldom/xmldom/security/advisories/GHSA-crh6-fp67-6883
github.com/jindw/xmldom/issues/150
lists.debian.org/debian-lts-announce/2023/01/msg00000.html
github.com/xmldom/xmldom/releases/tag/0.7.7
github.com/xmldom/xmldom/releases/tag/0.8.4
github.com/xmldom/xmldom/releases/tag/0.9.0-beta.4
Show 13 moreShow less
nvd.nist.gov/vuln/detail/CVE-2022-39353
github.com/xmldom/xmldom/commit/52a708360c35aa160fcca8621720d71fd0f95f1a
github.com/xmldom/xmldom/commit/7ff7c10ab2961703ac1752e95b4ff60ee4ee6643
github.com/xmldom/xmldom/commit/c02f786216bed70825f9a351c65e61500f51e931
github.com/advisories/GHSA-crh6-fp67-6883
github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39353.json
security-tracker.debian.org/tracker/CVE-2022-39353
github.com/xmldom/xmldom
ubuntu.com/security/CVE-2022-39353
ubuntu.com/security/notices/USN-6102-1
cve.org/CVERecord?id=CVE-2022-39353
ubuntu.com/security/CVE-2021-21366
ubuntu.com/security/CVE-2022-37616