CVE-2021-32796Xmldom Project Xmldom
Medium 5.3 No auth needed
Follow: this CVE · Xmldom Project · Xmldom Project Xmldom We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 3.1
- 5.3
- EPSS
- 1.4% probability of exploitation in 30 days · percentile 72
- Auth required
- No
- Published
- Jul 27, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
What happens
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.
What to do
- Apply the vendor's security update for Xmldom.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | @xmldom/xmldom |
< 0.7.0 |
0.7.0 |
npm install @xmldom/xmldom@0.7.0 |
| npm | xmldom |
≤ 0.6.0 |
no fixed version | — |
Per OSV / GitHub Advisories (GHSA-5fg8-2547-mr8q). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| xmldom_project | xmldom | < 0.7.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Third Party Advisory
- mattermost.com Not Applicable Third Party Advisory