Cross-site Scripting in dompurify
Cure53 DOMPurify before 2.0.17 allows mutation XSS. This occurs because a serialize-parse roundtrip does not necessarily return the original DOM tree, and a namespace can change from HTML to MathML, as demonstrated by nesting of FORM elements.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | dompurify | < 2.0.17 | 2.0.17 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-26870
- https://github.com/cure53/DOMPurify/commit/02724b8eb048dd219d6725b05c3000936f11d62d
- https://github.com/cure53/DOMPurify
- https://github.com/cure53/DOMPurify/compare/2.0.16...2.0.17
- https://lists.debian.org/debian-lts-announce/2020/10/msg00029.html
- https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-26870
- https://research.securitum.com/mutation-xss-via-mathml-mutation-dompurify-2-0-17-bypass
- https://snyk.io/vuln/SNYK-JS-DOMPURIFY-1016634
- https://www.oracle.com//security-alerts/cpujul2021.html
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N- Weakness (CWE)
CWE-79- Platform
- npm
- Package
dompurify- Disclosed
- 18.12.2020
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-63q7-h895-m982 - CC BY 4.0
Vulnerability history: dompurify
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 30
- First → latest
- 08.2020 10.2026
- Without a fix
- 1
- Exploited in attacks
- 0
Severity breakdown
- Critical 2
- High 3
- Medium 19
- Low 6
Disclosures per year
- 2020: 3
- 2021: 0
- 2022: 0
- 2023: 1
- 2024: 3
- 2025: 1
- 2026: 22
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.