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

CVE-2020-6817 — bleach

HIGH

CVE-2020-6817 is a high-severity (CVSS 7.5) CWE-1333 vulnerability in bleach. 1 public exploit reference exists, so weaponization risk is real. A fix is available for bleach — see the affected versions and patch details below.

regular expression denial-of-service (ReDoS) in Bleach

Also known asGHSA-vqhp-cxgc-6wmmPYSEC-2020-340SNYK-PYTHON-BLEACH-561754
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
1 known
Exploitation data as of Oct 29, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.

Exploitation and automatability from CISA’s SSVC triage for CVE-2020-6817.

EPSS Exploitation Probability

via FIRST.org ↗
0.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs54th percentile — riskier than 54% of all scored CVEsHighest risk
0.08%0.46%0.84%1.22%0.6%0.7%Apr 26Aug 26Oct 26

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

How urgent is this, really

CVE-2020-6817 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

bleach.clean behavior parsing style attributes could result in a regular expression denial of service (ReDoS).

Calls to bleach.clean with an allowed tag with an allowed style attribute are vulnerable to ReDoS. For example, bleach.clean(..., attributes={'a': ['style']}).

Patches

3.1.4

Workarounds

  • do not whitelist the style attribute in bleach.clean calls

  • limit input string length

References

Credits

  • Reported by schwag09 of r2c

For more information

If you have any questions or comments about this advisory:

Affected Packages

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

Affected Products

1 product · 1 configurations
Application
bleachmozilla
< 3.1.4
range
Exploits & PoCs
1

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.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-6817 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

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.

Frequently Asked Questions

### Impact `bleach.clean` behavior parsing style attributes could result in a regular expression denial of service (ReDoS). Calls to ``bleach.clean`` with an allowed tag with an allowed ``style`` attribute are vulnerable to ReDoS. For example, ``bleach.clean(..., attributes={'a': ['style']})``. ### Patches 3.1.4 ### Workarounds * do not whitelist the style attribute in `bleach.clean` calls * limit input string length ### References * https://bugzilla.mozilla.org/show_bug.cgi?id=1623633 * https://www.regular-expressions.info/redos.html * https://blog.r2c.dev/posts/finding-python-redos-
O3 Security · Impact-Aware SCA

Is CVE-2020-6817 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2020-6817: bleach DoS — Fixed in 3.1.4