CVE-2021-21366 json
Misinterpretation of malicious XML input
published 2021-03-12 5 y ago modified 2026-09-10 1 mo ago also GHSA-h6q6-9hqw-rwfv , EUVD-2021-0663
- cvss
- 4.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.3%
- EPSS 1.3% chance of exploitation in 30 days, percentile 71%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm xmldom 0.5.0
- xmldom_project xmldom 0.5.0
- node-xmldom Debian 14, Debian 13, Debian 12 0.5.0-1
debian advisories DEBIAN-CVE-2021-21366
- node-xmldom Ubuntu 20.04 LTS 0.1.27+ds-1+deb10u2build0.20.04.1
ubuntu advisories UBUNTU-CVE-2021-21366
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-21366 updated cvss 4.3
xmldom: incorrect parsing and serialization leads to unexpected behavior
-
Red Hat OpenShift Container Platform 3.11 openshift3/ose-console Red Hat OpenShift Container Platform 4 openshift4/ose-consolenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.34% chance of exploitation in the next 30 days, higher than 71% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
| NVD | 3.1 | 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | xmldom | <0.5.0 |
0.5.0 |
Affected products
- xmldom xmldom
Classification
References
-
github.com
/xmldom/xmldom/commit/d4201b9dfbf760049f457f9f08a3888d48835135
web, patch
-
github.com
/xmldom/xmldom/security/advisories/GHSA-h6q6-9hqw-rwfv
web, vendor-advisory
-
npmjs.com
/package/xmldom
web, product
-
github.com
/xmldom/xmldom/releases/tag/0.5.0
web, release-notes
-
lists.debian.org
/debian-lts-announce/2023/01/msg00000.html
mailing-list, web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-21366
advisory
-
github.com
/xmldom/xmldom
package
Sources
- CVE List CVE-2021-21366
- GitHub Advisory GHSA-h6q6-9hqw-rwfv
- NVD CVE-2021-21366
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.