CVE-2021-21366 Misinterpretation of malicious XML input
Attackers can exploit XML parsing flaws in xmldom to cause unexpected syntactic changes, potentially leading to code execution or data exposure.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-21366?
CVE-2021-21366 is a medium-severity vulnerability in Debian Debian Linux, published on 12 Mar 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
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.
Which versions are affected by CVE-2021-21366?
2 open source packages ship an affected version, including xmldom. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
xmldom npm | All versions | 0.5.0 |
xmldom npm | All versions | 0.5.0 |
Products include Debian Debian Linux, Xmldom Project Xmldom.
How do I fix CVE-2021-21366?
Upgrade xmldom to 0.5.0 or later.
Is CVE-2021-21366 being exploited?
There is no known exploitation of CVE-2021-21366 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as DEBIAN-CVE-2021-21366, GHSA-h6q6-9hqw-rwfv, UBUNTU-CVE-2021-21366.