CVE-2021-21366
MEDIUM 4.3CVSS 3.1Misinterpretation 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.
- Published
- 12 Mar 2021
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-115CWE-436
- Also known as
- GHSA-h6q6-9hqw-rwfv
- Sources
- NVDJSONOSV GHSA-h6q6-9hqw-rwfvJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | xmldom_project | xmldomcpe:2.3:a:xmldom_project:xmldom:*:*:*:*:*:node.js:*:* |
< 0.5.0 | 0.5.0 |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* |
= 10.0 | |
| OSV | npm | xmldom | < 0.5.0 | 0.5.0 |
References
- https://github.com/xmldom/xmldom/commit/d4201b9dfbf760049f457f9f08a3888d48835135 · Patch, WEB
- https://github.com/xmldom/xmldom/releases/tag/0.5.0 · Release Notes, WEB
- https://github.com/xmldom/xmldom/security/advisories/GHSA-h6q6-9hqw-rwfv · Vendor Advisory, WEB
- https://lists.debian.org/debian-lts-announce/2023/01/msg00000.html · Mailing List, Third Party Advisory, WEB
- https://www.npmjs.com/package/xmldom · Product, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-21366 · ADVISORY
- https://github.com/xmldom/xmldom · PACKAGE
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 12 Mar 2021)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 12 Mar 2021)