CVE-2021-21366Xmldom Project Xmldom
Medium 4.3 No auth needed
Follow: this CVE · Xmldom Project · Xmldom Project Xmldom We alert you by email or Slack (account required).
- Priority
- 41
- CVSS 3.1
- 4.3
- EPSS
- 1.3% probability of exploitation in 30 days · percentile 71
- Auth required
- No
- Published
- Mar 12, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
What happens
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.
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 |
< 0.5.0 |
0.5.0 |
npm install xmldom@0.5.0 |
Per OSV / GitHub Advisories (GHSA-h6q6-9hqw-rwfv). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| xmldom_project | xmldom | < 0.5.0 |
| debian | debian_linux | 10.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Release Notes
- github.com Vendor Advisory
- lists.debian.org Mailing List Third Party Advisory
- www.npmjs.com Product