CVE-2021-32796 Misinterpretation of malicious XML input in xmldom
Attackers can cause unexpected syntactic changes in XML processing by exploiting improper escaping of special characters in xmldom.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-32796?
CVE-2021-32796 is a medium-severity vulnerability in xmldom, published on 27 Jul 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
xmldom is an open source pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. xmldom versions 0.6.0 and older do not correctly escape special characters when serializing elements removed from their ancestor. This may lead to unexpected syntactic changes during XML processing in some downstream applications. This issue has been resolved in version 0.7.0. As a workaround downstream applications can validate the input and reject the maliciously crafted documents.
Which versions are affected by CVE-2021-32796?
4 open source packages ship an affected version, including @xmldom/xmldom and xmldom. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
@xmldom/xmldom npm | All versions | 0.7.0 |
@xmldom/xmldom npm | All versions | 0.7.0 |
xmldom npm | All versions to 0.6.0 | None |
xmldom npm | All versions to 0.6.0 | None |
Products include Xmldom Project Xmldom.
How do I fix CVE-2021-32796?
Upgrade @xmldom/xmldom to 0.7.0 or later.
Is CVE-2021-32796 being exploited?
There is no known exploitation of CVE-2021-32796 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2021-32796, GHSA-5fg8-2547-mr8q, UBUNTU-CVE-2021-32796.