{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-39353","id":"CVE-2022-39353","title":"xmldom allows multiple root nodes in a DOM","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 ","descriptionLong":"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`.","published":"2022-11-02T00:00:00.000Z","updated":"2026-11-17T09:00:05.665528087Z","reserved":"2022-09-02T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H","rating":"critical","source":"GitHub_M"},{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H","rating":"critical","source":"github.com"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub"}],"rating":"critical","products":["xmldom"],"affectedProducts":[{"vendor":"xmldom","product":"xmldom","defaultStatus":null,"versions":[{"version":"<= 0.6.0","status":"affected"},{"version":"< 0.7.7","status":"affected"},{"version":">= 0.8.0, < 0.8.4","status":"affected"},{"version":">= 0.9.0-beta.1, < 0.9.0-beta.4","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"xmldom","purl":"pkg:npm/xmldom","ranges":["<=0.6.0"],"fixed":[],"advisory":"GHSA-crh6-fp67-6883"},{"ecosystem":"npm","name":"@xmldom/xmldom","purl":"pkg:npm/%40xmldom/xmldom","ranges":["<0.7.7",">=0.8.0 <0.8.4",">=0.9.0-beta.1 <0.9.0-beta.4"],"fixed":["0.7.7","0.8.4","0.9.0-beta.4"],"advisory":"GHSA-crh6-fp67-6883"}],"cwes":["CWE-20","CWE-1288"],"aliases":["GHSA-crh6-fp67-6883"],"references":[{"url":"https://github.com/xmldom/xmldom/security/advisories/GHSA-crh6-fp67-6883","tags":["x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/jindw/xmldom/issues/150","tags":["x_transferred","Exploit","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/01/msg00000.html","tags":["mailing-list","x_transferred","Mailing List","Third Party Advisory","article","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39353.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39353","tags":["advisory"]},{"url":"https://github.com/xmldom/xmldom/commit/52a708360c35aa160fcca8621720d71fd0f95f1a","tags":["web"]},{"url":"https://github.com/xmldom/xmldom/commit/7ff7c10ab2961703ac1752e95b4ff60ee4ee6643","tags":["web"]},{"url":"https://github.com/xmldom/xmldom/commit/c02f786216bed70825f9a351c65e61500f51e931","tags":["web"]},{"url":"https://github.com/xmldom/xmldom","tags":["package"]},{"url":"https://github.com/xmldom/xmldom/releases/tag/0.7.7","tags":["web"]},{"url":"https://github.com/xmldom/xmldom/releases/tag/0.8.4","tags":["web"]},{"url":"https://github.com/xmldom/xmldom/releases/tag/0.9.0-beta.4","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial"},"epss":0.01559,"epssPercentile":0.75753,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-39353","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39353","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-39353","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-crh6-fp67-6883","ok":true,"note":"GHSA-crh6-fp67-6883"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-39353","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}