# CVE-2021-21366: Misinterpretation of malicious XML input

- Severity: Medium 4.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.34%, higher than 72% of CVEs (2026-12-01)
- Published: 2021-03-12T00:00:00.000Z
- Modified: 2026-09-10T03:49:02.254Z
- Also known as: GHSA-h6q6-9hqw-rwfv
- Weaknesses: CWE-115, CWE-436
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- xmldom xmldom: < 0.5.0
- xmldom (npm): before 0.5.0
- xmldom_project xmldom: before 0.5.0
- debian debian_linux: 10.0

## Every score

- GitHub_M: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N`
- GitHub: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N`
- NVD: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/xmldom/xmldom/security/advisories/GHSA-h6q6-9hqw-rwfv> (vendor-advisory, web)
- <https://www.npmjs.com/package/xmldom> (product, web)
- <https://github.com/xmldom/xmldom/releases/tag/0.5.0> (release-notes, web)
- <https://github.com/xmldom/xmldom/commit/d4201b9dfbf760049f457f9f08a3888d48835135> (patch, web)
- <https://lists.debian.org/debian-lts-announce/2023/01/msg00000.html> (mailing-list, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-21366> (advisory)
- <https://github.com/xmldom/xmldom> (package)

## Sources

- CVE List: [CVE-2021-21366](https://www.cve.org/CVERecord?id=CVE-2021-21366), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-h6q6-9hqw-rwfv](https://github.com/advisories/GHSA-h6q6-9hqw-rwfv), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2021-21366](https://nvd.nist.gov/vuln/detail/CVE-2021-21366), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-21366 · Whole record: https://cve.day/CVE-2021-21366.json · Rebuilt by cve.day 2026-11-25T22:58:00.277Z
