Misinterpretation of malicious XML input
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| xmldom | xmldom | before 0.5.0 | 0.5.0 | Patch available | CNA |
| — | xmldom (npm) | before 0.5.0 | 0.5.0 | Patch available | GHSA-h6q6-9hqw-rwfv |
- xmldom Vendorxmldom Affected before 0.5.0 Fixed in 0.5.0 Patch available CNA
- xmldom (npm) Vendor— Affected before 0.5.0 Fixed in 0.5.0 Patch available GHSA-h6q6-9hqw-rwfv
Remediation
- Fix · CNA xmldom (xmldom) Fixed in 0.5.0
- Fix · GHSA-h6q6-9hqw-rwfv xmldom (npm) Fixed in 0.5.0 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
Not affected: 2 products
- Red Hat OpenShift Container Platform 3.11
- Red Hat OpenShift Container Platform 4
Timeline
- 2026-10-02 Threatist record created from CVE-2021-21366
- 2026-10-03 Alias added: GHSA-h6q6-9hqw-rwfv
References
Advisory 3
More Xmldom vulnerabilities
- TI-2022-18728 xmldom allows multiple root nodes in a DOM CVSS 3.1CRITICAL 9.8
- TI-2022-17521 A prototype pollution vulnerability exists in the function copy in dom.js in the xmldom… CVSS 3.1CRITICAL 9.8
- TI-2021-12462 Misinterpretation of malicious XML input in xmldom CVSS 3.1MEDIUM 6.5
Sources
- CVE-2021-21366 · CVE Program
- CVE-2021-21366 · NVD
- FIRST EPSS
- GHSA-h6q6-9hqw-rwfv · GitHub Advisory Database · CC BY 4.0
- CVE-2021-21366 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences