Vulnerability · Published Jul 27, 2021 · Assigned by GitHub_M
CVE-2021-32796Misinterpretation of malicious XML input in xmldom
Medium 6.5
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.4% (higher than 72% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-xmldom | 0.7.3-1 | DEBIAN-CVE-2021-32796 |
| Debian:13 | node-xmldom | 0.7.3-1 | DEBIAN-CVE-2021-32796 |
| Debian:14 | node-xmldom | 0.7.3-1 | DEBIAN-CVE-2021-32796 |
| Ubuntu:24.04:LTS | node-xmldom | no fix listed | UBUNTU-CVE-2021-32796 |
| Ubuntu:25.10 | node-xmldom | no fix listed | UBUNTU-CVE-2021-32796 |
| Ubuntu:26.04:LTS | node-xmldom | no fix listed | UBUNTU-CVE-2021-32796 |
| Ubuntu:26.10 | node-xmldom | no fix listed | UBUNTU-CVE-2021-32796 |
| npm | @xmldom/xmldom | 0.7.0 | GHSA-5fg8-2547-mr8q |
| npm | xmldom | no fix listed | GHSA-5fg8-2547-mr8q |
Affected products (as reported)
Weakness: CWE-116 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N