{"id":"CVE-2021-32796","published":"2021-07-27T21:45:13Z","modified":"2024-08-03T23:33:55Z","title":"Misinterpretation of malicious XML input in xmldom","vendor":"xmldom","product":"xmldom","tier":"tail","description":{"text":"xmldom is an open source pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. xmldom versions 0.6.0 and older do not correctly escape special characters when serializing elements removed from their ancestor. This may lead to unexpected syntactic changes during XML processing in some downstream applications. This issue has been resolved in version 0.7.0. As a workaround downstream applications can validate the input and reject the maliciously crafted documents.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01358,"percentile":0.72364,"provenance":"source"},"cwes":[{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://mattermost.com/blog/coordinated-disclosure-go-xml-vulnerabilities/","tags":["x_refsource_MISC"]},{"url":"https://github.com/xmldom/xmldom/security/advisories/GHSA-5fg8-2547-mr8q","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/xmldom/xmldom/commit/7b4b743917a892d407356e055b296dcd6d107e8b","tags":["x_refsource_MISC"]}],"priority":{"score":19.0,"factors":[{"name":"EPSS percentile","points":14.47},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"xmldom","affectedVersions":[{"vendor":"xmldom","product":"xmldom","versions":["< 0.7.0"]}],"affected":[{"ecosystem":"npm","package":"xmldom","vulnerableRanges":["<=0.6.0"],"patched":[],"from":["GHSA-5fg8-2547-mr8q"],"provenance":"source"},{"ecosystem":"npm","package":"@xmldom/xmldom","vulnerableRanges":["<0.7.0"],"patched":["0.7.0"],"from":["GHSA-5fg8-2547-mr8q"],"provenance":"source"}],"summary":{"text":"The xmldom JavaScript DOMParser and XMLSerializer module, in versions 0.6.0 and older, fails to correctly escape special characters when serializing elements that have been removed from their ancestor. An attacker who can supply crafted XML can cause unexpected syntactic changes in downstream applications that process the output, and the attack needs only network access with no authentication, user interaction, or special configuration.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:33:57Z"},"euvd":{"id":"EUVD-2021-1574","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-xmldom-cve-2021-21366","parents":[{"from":"CVE-2021-21366","to":"CVE-2021-32796","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/dom.js"],"commits":["https://github.com/xmldom/xmldom/commit/d4201b9dfbf760049f457f9f08a3888d48835135","https://github.com/xmldom/xmldom/commit/7b4b743917a892d407356e055b296dcd6d107e8b"],"basis":"shared function","functions":["serializeToString"]}]}],"children":[{"from":"CVE-2021-32796","to":"CVE-2022-39353","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@xmldom/xmldom","fromFixed":"0.7.0","toFixed":"0.7.7","daysApart":463},{"kind":"same-code","provenance":"machine","files":["lib/dom.js"],"commits":["https://github.com/xmldom/xmldom/commit/7b4b743917a892d407356e055b296dcd6d107e8b","https://github.com/xmldom/xmldom/commit/52a708360c35aa160fcca8621720d71fd0f95f1a","https://github.com/xmldom/xmldom/commit/7ff7c10ab2961703ac1752e95b4ff60ee4ee6643"],"basis":"shared function","functions":["needNamespaceDefine","serializeToString"]}]},{"from":"CVE-2021-32796","to":"CVE-2026-83608","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/dom.js"],"commits":["https://github.com/xmldom/xmldom/commit/7b4b743917a892d407356e055b296dcd6d107e8b","https://github.com/xmldom/xmldom/commit/57aec90ac57b4408ae7c5d1746bf2a693b5ed90e","https://github.com/xmldom/xmldom/commit/85f12eb4d14b44de33216cfb72b50af4d24e9fdd"],"basis":"shared function","functions":["serializeToString"]}]}],"packageHistory":[{"cve":"CVE-2021-32796","published":"2021-07-27","fixed":"0.7.0","kev":false},{"cve":"CVE-2026-83619","published":"2026-09-01","fixed":"0.8.15","kev":false},{"cve":"CVE-2022-39353","published":"2022-11-02","fixed":"0.9.0-beta.4","kev":false},{"cve":"CVE-2026-34601","published":"2026-04-02","fixed":"0.9.9","kev":false}],"package":"npm:@xmldom/xmldom"}}