{"id":"CVE-2021-21366","published":"2021-03-12T00:00:00Z","modified":"2024-08-03T18:09:16Z","title":"Misinterpretation of malicious XML input","vendor":"xmldom","product":"xmldom","tier":"tail","description":{"text":"xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. xmldom versions 0.4.0 and older do not correctly preserve system identifiers, FPIs or namespaces when repeatedly parsing and serializing maliciously crafted documents. This may lead to unexpected syntactic changes during XML processing in some downstream applications. This is fixed in version 0.5.0. As a workaround downstream applications can validate the input and reject the maliciously crafted documents.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0134,"percentile":0.72002,"provenance":"source"},"cwes":[{"id":"CWE-436","name":"Interpretation Conflict"},{"id":"CWE-115","name":"Misinterpretation of Input"}],"references":[{"url":"https://github.com/xmldom/xmldom/security/advisories/GHSA-h6q6-9hqw-rwfv","tags":[]},{"url":"https://www.npmjs.com/package/xmldom","tags":[]},{"url":"https://github.com/xmldom/xmldom/releases/tag/0.5.0","tags":[]},{"url":"https://github.com/xmldom/xmldom/commit/d4201b9dfbf760049f457f9f08a3888d48835135","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2023/01/msg00000.html","tags":["mailing-list"]}],"priority":{"score":17.4,"factors":[{"name":"EPSS percentile","points":14.4},{"name":"CVSS severity","points":3.01}]},"vendorSlug":"xmldom","affectedVersions":[{"vendor":"xmldom","product":"xmldom","versions":["< 0.5.0"]}],"affected":[{"ecosystem":"npm","package":"xmldom","vulnerableRanges":["<0.5.0"],"patched":["0.5.0"],"from":["GHSA-h6q6-9hqw-rwfv"],"provenance":"source"}],"summary":{"text":"The xmldom JavaScript DOMParser and XMLSerializer module, in versions 0.4.0 and older, fails to correctly preserve system identifiers, FPIs, or namespaces when maliciously crafted XML documents are repeatedly parsed and serialized. An attacker who can supply such a document over the network, with a user needing to interact with the processing, can cause unexpected syntactic changes to the XML in downstream applications that use it, with the impact limited to integrity.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:09:54Z"},"euvd":{"id":"EUVD-2021-0663","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-xmldom-cve-2021-21366","children":[{"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"]}]},{"from":"CVE-2021-21366","to":"CVE-2022-39353","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/52a708360c35aa160fcca8621720d71fd0f95f1a","https://github.com/xmldom/xmldom/commit/7ff7c10ab2961703ac1752e95b4ff60ee4ee6643"],"basis":"shared function","functions":["serializeToString"]}]},{"from":"CVE-2021-21366","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/d4201b9dfbf760049f457f9f08a3888d48835135","https://github.com/xmldom/xmldom/commit/57aec90ac57b4408ae7c5d1746bf2a693b5ed90e","https://github.com/xmldom/xmldom/commit/85f12eb4d14b44de33216cfb72b50af4d24e9fdd"],"basis":"shared function","functions":["serializeToString"]}]}]}}