CVE-2020-6816 Bleach vulnerable to mutation XSS via whitelisted math or svg and raw tag

Medium 6.1 Published Updated

Attackers can execute arbitrary scripts via mutation XSS in Mozilla Bleach when specific tags are whitelisted and strip is disabled.

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-6816?

CVE-2020-6816 is a medium-severity cross-site scripting vulnerability in Fedoraproject Fedora, published on 24 Mar 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

In Mozilla Bleach before 3.12, a mutation XSS in bleach.clean when RCDATA and either svg or math tags are whitelisted and the keyword argument strip=False.

Weakness: CWE-79

Which versions are affected by CVE-2020-6816?

3 open source packages ship an affected version, including bleach. It affects 2 products.

PackageAffectedFixed in
bleach PyPIAll versions3.1.2
bleach PyPIAll versions3.1.2
bleach PyPIAll versions3.1.2

Products include Fedoraproject Fedora, Mozilla Bleach.

How do I fix CVE-2020-6816?

Upgrade bleach to 3.1.2 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-6816 being exploited?

There is no known exploitation of CVE-2020-6816 in the wild and no public exploit code.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as DEBIAN-CVE-2020-6816, DSA-4643-1, GHSA-m6xf-fq7q-8743, PYSEC-2020-28, UBUNTU-CVE-2020-6816.

Is CVE-2020-6816 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free