# bleach (PyPI)

An easy safelist-based HTML-sanitizing tool.

- Latest: 6.4.0 (2026-06-05)
- Licence: Apache Software License
- Downloads: 74695192 last month
- Advisories on the latest version: 0

- GHSA-8rfp-98v4-mmr6 LOW: Bleach: URI sanitization allows disallowed URI schemes with Unicode > U+00A0 in output Fixed in 6.4.0.
- GHSA-g75f-g53v-794x MODERATE: Bleach linkify(parse_email=True) CPU exhaustion via unbounded email regex scanning
- GHSA-gj48-438w-jh9v MODERATE: Bleach clean() / Cleaner() fails to sanitize dangerous URI schemes in allowed formaction attributes Fixed in 6.4.0.
- CVE-2021-23980 MODERATE: Cross-site scripting in Bleach Fixed in 3.3.0.
- CVE-2021-23980 :  Fixed in 3.3.0.
- CVE-2020-6817 HIGH: regular expression denial-of-service (ReDoS) in Bleach Fixed in 3.1.4.
- CVE-2020-6817 :  Fixed in 3.1.4.
- CVE-2020-6816 MODERATE: Bleach vulnerable to mutation XSS via whitelisted math or svg and raw tag Fixed in 3.1.2.
- CVE-2020-6802 :  Fixed in 3.1.1.
- CVE-2020-6816 :  Fixed in 3.1.2.
- CVE-2020-6802 MODERATE: XSS in Bleach when noscript and raw tag whitelisted Fixed in 3.1.1.
- CVE-2018-7753 CRITICAL: Bleach URI Scheme Restriction Bypass Fixed in 2.1.3.
- CVE-2018-7753 :  Fixed in 2.1.3.

Sources: PyPI, deps.dev (CC BY 4.0), OSV. Last checked 4 Dec 2026.
