Is bleach 3.1 vulnerable?
PyPI · 6 releases from 3.1.0 to 3.1.5 · latest bleach is 6.4.0 · checked 18 Nov 2026
Yes: 3 known advisories
Yes. bleach 3.1.5, the last 3.1 release, is affected by 3 known security advisories (2 medium, 1 low), including CVE-2021-23980. 3 more affect earlier 3.1.x releases. Upgrade to 6.4.0 or later to fix all of them.
pip install 'bleach>=6.4.0'Is your project on an affected bleach?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Advisories affecting bleach 3.1.5
Bleach clean() / Cleaner() fails to sanitize dangerous URI schemes in allowed formaction attributes
- Affected
- <6.4.0
- Fixed in
- 6.4.0
Bleach: URI sanitization allows disallowed URI schemes with Unicode > U+00A0 in output
- Affected
- <6.4.0
- Fixed in
- 6.4.0
Cross-site scripting in Bleach
- Affected
- <3.3.0
- Fixed in
- 3.3.0
Fixed within 3.1.x, affecting earlier releases
regular expression denial-of-service (ReDoS) in Bleach
- Affected
- <3.1.4
- Fixed in
- 3.1.4
Bleach vulnerable to mutation XSS via whitelisted math or svg and raw tag
- Affected
- <3.1.2
- Fixed in
- 3.1.2
XSS in Bleach when noscript and raw tag whitelisted
- Affected
- <3.1.1
- Fixed in
- 3.1.1
Every bleach 3.1.x release
Affected: 3.1.0 to 3.1.5. Latest bleach: 6.4.0.
| Version | Known advisories |
|---|---|
| bleach 3.1.5 | GHSA-gj48-438w-jh9v, GHSA-8rfp-98v4-mmr6, CVE-2021-23980 |
| bleach 3.1.4 | GHSA-gj48-438w-jh9v, GHSA-8rfp-98v4-mmr6, CVE-2021-23980 |
| bleach 3.1.3 | GHSA-gj48-438w-jh9v, GHSA-8rfp-98v4-mmr6, CVE-2021-23980, CVE-2020-6817 |
| bleach 3.1.2 | GHSA-gj48-438w-jh9v, GHSA-8rfp-98v4-mmr6, CVE-2021-23980, CVE-2020-6817 |
| bleach 3.1.1 | GHSA-gj48-438w-jh9v, GHSA-8rfp-98v4-mmr6, CVE-2021-23980, CVE-2020-6817, CVE-2020-6816 |
| bleach 3.1.0 | GHSA-gj48-438w-jh9v, GHSA-8rfp-98v4-mmr6, CVE-2021-23980, CVE-2020-6817, CVE-2020-6816, CVE-2020-6802 |
Which of your client projects are still on bleach 3.1?
NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact bleach version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.
Other bleach versions
Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the PyPI registry. Refreshed daily.