Vulnerability · Published Mar 12, 2021 · Assigned by GitHub_M
CVE-2021-21366Misinterpretation of malicious XML input
Medium 4.3
In plain English
A medium-severity security flaw in xmldom from xmldom. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.3% (higher than 71% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-xmldom | 0.5.0-1 | DEBIAN-CVE-2021-21366 |
| Debian:13 | node-xmldom | 0.5.0-1 | DEBIAN-CVE-2021-21366 |
| Debian:14 | node-xmldom | 0.5.0-1 | DEBIAN-CVE-2021-21366 |
| Ubuntu:22.04:LTS | node-xmldom | 0.7.5-1ubuntu0.22.04.1 | USN-6102-1 |
| npm | xmldom | 0.5.0 | GHSA-h6q6-9hqw-rwfv |
Affected products (as reported)
Weakness: CWE-436, CWE-115 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
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
- [debian-lts-announce] 20230101 [SECURITY] [DLA 3260-1] node-xmldom security update mailing-list