{"id":"CVE-2021-21366","aliases":["CLSA-2026-1772583195","DEBIAN-CVE-2021-21366","DLA-3260-1","EUVD-2021-0663","GHSA-h6q6-9hqw-rwfv","UBUNTU-CVE-2021-21366","USN-6102-1"],"status":"published","title":"Misinterpretation of malicious XML input","description":"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.","severity":{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.0134,"percentile":0.71714,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-115","CWE-436"],"published":"2021-03-12T00:00:00Z","modified":"2026-11-05T13:28:23Z","fixes":[{"ecosystem":"npm","package":"xmldom","fixed_in":["0.5.0"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"node-xmldom","fixed_in":["0.5.0-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"node-xmldom","fixed_in":["0.5.0-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-xmldom","fixed_in":["0.5.0-1"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"node-xmldom","fixed_in":["0.1.27+ds-1+deb10u2build0.20.04.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"xmldom","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.5.0"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"xmldom","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.1.31-tuxcare.0"},{"fixed":"0.1.31-tuxcare.1"}]}],"versions":["0.1.31"],"bundled":2},{"source":"osv","ecosystem":"Debian:12","package":"node-xmldom","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.5.0-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"node-xmldom","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.5.0-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"node-xmldom","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.5.0-1"}]}]},{"source":"osv","ecosystem":"Debian:10","package":"node-xmldom","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.27+ds-1+deb10u2"}]}],"versions":["0.1.27+ds-1","0.1.27+ds-1+deb10u1"],"bundled":2},{"source":"osv","ecosystem":"npm","package":"xmldom","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.5.0"}]}]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"node-xmldom","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.27+ds-1+deb10u2build0.20.04.1"}]}],"versions":["0.1.27+ds-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"node-xmldom","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.27+ds-1+deb10u2build0.20.04.1"}]}],"versions":["0.1.27+ds-1"],"bundled":3},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-xmldom","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.7.5-1ubuntu0.22.04.1"}]}],"versions":["0.5.0-1","0.7.3-1","0.7.5-1"],"bundled":3}],"products":[{"vendor":"debian","product":"debian_linux"},{"vendor":"xmldom","product":"xmldom"},{"vendor":"xmldom_project","product":"xmldom"}],"references":[{"url":"https://github.com/xmldom/xmldom/security/advisories/GHSA-h6q6-9hqw-rwfv","tags":["x_transferred","Vendor Advisory","advisory","web","report"]},{"url":"https://www.npmjs.com/package/xmldom","tags":["x_transferred","Product","web","report"]},{"url":"https://github.com/xmldom/xmldom/releases/tag/0.5.0","tags":["x_transferred","Release Notes","advisory","web","report"]},{"url":"https://github.com/xmldom/xmldom/commit/d4201b9dfbf760049f457f9f08a3888d48835135","tags":["x_transferred","Patch","fix","web","report"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/01/msg00000.html","tags":["mailing-list","x_transferred","Mailing List","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21366","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-h6q6-9hqw-rwfv"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-21366","tags":["advisory"]},{"url":"https://github.com/xmldom/xmldom","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2021-21366","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-6102-1","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-21366","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-37616","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-39353","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-21366","title":"Misinterpretation of malicious XML input","description":"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.","status":"published","published":"2021-03-12T00:00:00Z","modified":"2024-08-03T18:09:16Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-436","CWE-115"],"updated_at":"2026-11-02T14:33:00.137099Z"}],"euvd":[{"id":"EUVD-2021-0663","description":"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.","status":"published","published":"2021-03-12T00:00:00Z","modified":"2024-08-03T18:09:16Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"updated_at":"2026-11-03T03:25:06.347262Z"}],"ghsa":[{"id":"GHSA-h6q6-9hqw-rwfv","title":"Misinterpretation of malicious XML input","description":"### Impact\n\nxmldom versions 0.4.0 and older do not correctly preserve [system identifiers](https://www.w3.org/TR/2008/REC-xml-20081126/#d0e4313), [FPIs](https://en.wikipedia.org/wiki/Formal_Public_Identifier) or [namespaces](https://www.w3.org/TR/xml-names11/) when repeatedly parsing and serializing maliciously crafted documents.\n\nThis may lead to unexpected syntactic changes during XML processing in some downstream applications.\n\n### Patches\n\nUpdate to 0.5.0 (once it is released)\n\n### Workarounds\n\nDownstream applications can validate the input and reject the maliciously crafted documents.\n\n### References\n\nSimilar to this one reported on the Go standard library:\n\n- https://mattermost.com/blog/coordinated-disclosure-go-xml-vulnerabilities/\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [`xmldom/xmldom`](https://github.com/xmldom/xmldom)\n* Email us: send an email to **all** addresses that are shown by `npm owner ls xmldom`","status":"published","published":"2021-03-12T22:39:39Z","modified":"2023-02-02T05:05:21Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"cwes":["CWE-115","CWE-436"],"updated_at":"2026-11-02T14:36:41.247728Z"}],"nvd":[{"id":"CVE-2021-21366","description":"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.","status":"published","published":"2021-03-12T17:15:12.643Z","modified":"2026-06-17T03:35:24.04Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-115","CWE-436"],"updated_at":"2026-11-02T14:06:50.805771Z"}],"osv":[{"id":"CVE-2021-21366","description":"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.","status":"published","published":"2021-03-12T17:15:12.643Z","modified":"2026-10-20T10:54:28.526414078Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:18.004149Z"},{"id":"DEBIAN-CVE-2021-21366","description":"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.","status":"published","published":"2021-03-12T17:15:12.643Z","modified":"2026-10-23T18:03:48.869508076Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:34.637046Z"},{"id":"GHSA-h6q6-9hqw-rwfv","title":"Misinterpretation of malicious XML input","description":"### Impact\n\nxmldom versions 0.4.0 and older do not correctly preserve [system identifiers](https://www.w3.org/TR/2008/REC-xml-20081126/#d0e4313), [FPIs](https://en.wikipedia.org/wiki/Formal_Public_Identifier) or [namespaces](https://www.w3.org/TR/xml-names11/) when repeatedly parsing and serializing maliciously crafted documents.\n\nThis may lead to unexpected syntactic changes during XML processing in some downstream applications.\n\n### Patches\n\nUpdate to 0.5.0 (once it is released)\n\n### Workarounds\n\nDownstream applications can validate the input and reject the maliciously crafted documents.\n\n### References\n\nSimilar to this one reported on the Go standard library:\n\n- https://mattermost.com/blog/coordinated-disclosure-go-xml-vulnerabilities/\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [`xmldom/xmldom`](https://github.com/xmldom/xmldom)\n* Email us: send an email to **all** addresses that are shown by `npm owner ls xmldom`","status":"published","published":"2021-03-12T22:39:39Z","modified":"2026-09-10T03:49:02.25467856Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"cwes":["CWE-115","CWE-436"],"updated_at":"2026-11-02T15:46:48.546324Z"},{"id":"UBUNTU-CVE-2021-21366","description":"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.","status":"published","published":"2021-03-12T17:15:00Z","modified":"2026-02-04T02:24:02.11174Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"},{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:54:26.29421Z"},{"id":"CLSA-2026-1772583195","title":"TuxCare security update for xmldom (2 CVEs)","description":"TuxCare rebuilt xmldom to address 2 CVEs. Fixed in 0.1.31-tuxcare.1.","status":"published","published":"2026-08-04T14:52:10Z","modified":"2026-11-05T13:28:23.268077388Z","updated_at":"2026-11-05T16:37:45.64821Z"},{"id":"DLA-3260-1","title":"node-xmldom - security update","status":"published","published":"2023-01-01T00:00:00Z","modified":"2026-03-09T01:23:26.312552Z","updated_at":"2026-11-02T15:46:11.734021Z"},{"id":"USN-6102-1","title":"node-xmldom vulnerabilities","description":"It was discovered that xmldom incorrectly handled certain inputs. If a\nuser or an automated system were tricked into opening a specially crafted\ninput file, a remote attacker could possibly use this issue to cause \nunexpected syntactic changes during XML processing. This issue only affected\nUbuntu 20.04 LTS. (CVE-2021-21366)\n\nIt was discovered that xmldom incorrectly handled certain inputs. If a\nuser or an automated system were tricked into opening a specially crafted\ninput file, a remote attacker could possibly use this issue to cause a\ndenial of service. (CVE-2022-37616, CVE-2022-39353)\n","status":"published","published":"2023-05-24T09:57:50Z","modified":"2026-04-27T16:47:15.408905996Z","updated_at":"2026-11-02T16:58:16.738762Z"}]}}
