Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
MEDIUM severity

CVE-2020-6802 — bleach

MEDIUMFix: mozilla/bleach@f77e0f6

CVE-2020-6802 is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in bleach. 2 public exploit references exist, so weaponization risk is real. A fix is available for bleach — see the affected versions and patch details below.

XSS in Bleach when noscript and raw tag whitelisted

Also known asGHSA-q65m-pv3f-wr5rPYSEC-2020-27
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
2 known
Exploitation data as of Oct 29, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs78th percentile — riskier than 78% of all scored CVEsHighest risk
0.00%0.74%1.49%2.23%0.3%1.7%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2020-6802 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 397,508 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🐍bleach

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Impact

A mutation XSS affects users calling bleach.clean with noscript and a raw tag (see below) in the allowed/whitelisted tags option.

Patches

v3.1.1

Workarounds

  • modify bleach.clean calls to not whitelist noscript and one or more of the following raw tags:
title
textarea
script
style
noembed
noframes
iframe
xmp

References

Credits

  • Reported by Yaniv Nizry from the CxSCA AppSec group at Checkmarx

For more information

If you have any questions or comments about this advisory:

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIbleachall versions3.1.1pip install --upgrade 'bleach==3.1.1'

Affected Products

2 products · 4 configurations
OS
fedorafedoraproject
3 versions
303132
Application
bleachmozilla
< 3.1.1
range
Exploits & PoCs
2

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for bleach, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update bleach to 3.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-6802 is resolved across your whole dependency graph.

  3. Workarounds

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

UbuntuMEDIUM

Frequently Asked Questions

### Impact A [mutation XSS](https://cure53.de/fp170.pdf) affects users calling `bleach.clean` with `noscript` and a raw tag (see below) in the allowed/whitelisted tags option. ### Patches v3.1.1 ### Workarounds * modify `bleach.clean` calls to not whitelist `noscript` and one or more of the following raw tags: ``` title textarea script style noembed noframes iframe xmp ``` * A strong [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) without `unsafe-inline` and `unsafe-eval` [`script-src`s](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-S
O3 Security · Impact-Aware SCA

Is CVE-2020-6802 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2020-6802: bleach XSS — Fixed in 3.1.1