# CVE-2021-32796: Misinterpretation of malicious XML input in xmldom

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/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.36%, higher than 72% of CVEs (2026-12-01)
- Published: 2021-07-27T21:45:13.000Z
- Modified: 2026-09-10T03:49:15.589Z
- Also known as: GHSA-5fg8-2547-mr8q
- Weaknesses: CWE-91, CWE-116
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- xmldom xmldom: < 0.7.0
- xmldom (npm): up to 0.6.0
- @xmldom/xmldom (npm): before 0.7.0
- xmldom_project xmldom: before 0.7.0

## Every score

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

## References

- <https://mattermost.com/blog/coordinated-disclosure-go-xml-vulnerabilities/> (not-applicable, third-party-advisory)
- <https://github.com/xmldom/xmldom/security/advisories/GHSA-5fg8-2547-mr8q> (third-party-advisory, web)
- <https://github.com/xmldom/xmldom/commit/7b4b743917a892d407356e055b296dcd6d107e8b> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32796> (advisory)
- <https://github.com/xmldom/xmldom> (package)
- <https://mattermost.com/blog/coordinated-disclosure-go-xml-vulnerabilities> (web)
- <https://mattermost.com/blog/securing-xml-implementations-across-the-web> (web)
- <https://www.npmjs.com/package/@xmldom/xmldom> (web)

## Sources

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

---

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