CVE-2020-26870 Cross-site Scripting in dompurify
Mutation XSS in DOMPurify allows attackers to execute arbitrary scripts by exploiting namespace changes during serialization.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2020-26870?
CVE-2020-26870 is a medium-severity cross-site scripting vulnerability in Debian Debian Linux, published on 7 Oct 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-79
Which versions are affected by CVE-2020-26870?
2 open source packages ship an affected version, including dompurify. It affects 5 products.
| Package | Affected | Fixed in |
|---|---|---|
dompurify npm | All versions | 2.0.17 |
dompurify npm | All versions | 2.0.17 |
Products include Cure53 Dompurify, Debian Debian Linux, Microsoft Visual Studio 2017, Microsoft Visual Studio 2019, Oracle Application Express.
How do I fix CVE-2020-26870?
Upgrade dompurify to 2.0.17 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2020-26870 being exploited?
There is no known exploitation of CVE-2020-26870 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
- CVE-2024-47875 DOMPurify nesting-based mXSS
- CVE-2024-48910 DOMPurify vulnerable to tampering by prototype polution
- CVE-2026-47423 DOMPurify XSS via `selectedcontent` re-clone
- CVE-2024-45801 Tampering by prototype polution in DOMPurify
- CVE-2026-49978 DOMPurify IN_PLACE Sanitization Bypass via Attached Shadow Root Inside <template>.content
Sources
Also known as GHSA-63q7-h895-m982, UBUNTU-CVE-2020-26870.