CVE-2021-21366Misinterpretation of malicious XML input
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.
What to do
Fixed builds are available from Debian, Ubuntu, npm: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | node-xmldom | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | node-xmldom | Fixed | 0.1.27+ds-1+deb10u2build0.20.04.1 | UBUNTU-CVE-2021-21366 |
| Debian 14 | node-xmldom | Fixed | 0.5.0-1 | DEBIAN-CVE-2021-21366 |
| Debian 13 | node-xmldom | Fixed | 0.5.0-1 | DEBIAN-CVE-2021-21366 |
| Debian 12 | node-xmldom | Fixed | 0.5.0-1 | DEBIAN-CVE-2021-21366 |
| npm library | xmldom | Fixed | 0.5.0 | GHSA-h6q6-9hqw-rwfv |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- xmldom: affected: < 0.5.0
References
- https://github.com/xmldom/xmldom/security/advisories/GHSA-h6q6-9hqw-rwfv
- https://www.npmjs.com/package/xmldom
- https://github.com/xmldom/xmldom/releases/tag/0.5.0
- https://github.com/xmldom/xmldom/commit/d4201b9dfbf760049f457f9f08a3888d48835135
- https://lists.debian.org/debian-lts-announce/2023/01/msg00000.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.