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.

Upgrade with:pip install 'bleach>=6.4.0'

Is your project on an affected bleach?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

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

  • MediumGHSA-gj48-438w-jh9v16 Jun 2026

    Bleach clean() / Cleaner() fails to sanitize dangerous URI schemes in allowed formaction attributes

    Affected
    <6.4.0
    Fixed in
    6.4.0
  • LowGHSA-8rfp-98v4-mmr616 Jun 2026

    Bleach: URI sanitization allows disallowed URI schemes with Unicode > U+00A0 in output

    Affected
    <6.4.0
    Fixed in
    6.4.0
  • MediumCVE-2021-23980GHSA-vv2x-vrpj-qqpq2 Feb 2021

    Cross-site scripting in Bleach

    Affected
    <3.3.0
    Fixed in
    3.3.0

Fixed within 3.1.x, affecting earlier releases

  • HighCVE-2020-6817GHSA-vqhp-cxgc-6wmm30 Mar 2020

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

    Affected
    <3.1.4
    Fixed in
    3.1.4
  • MediumCVE-2020-6816GHSA-m6xf-fq7q-874324 Mar 2020

    Bleach vulnerable to mutation XSS via whitelisted math or svg and raw tag

    Affected
    <3.1.2
    Fixed in
    3.1.2
  • MediumCVE-2020-6802GHSA-q65m-pv3f-wr5r24 Feb 2020

    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.

VersionKnown advisories
bleach 3.1.5GHSA-gj48-438w-jh9v, GHSA-8rfp-98v4-mmr6, CVE-2021-23980
bleach 3.1.4GHSA-gj48-438w-jh9v, GHSA-8rfp-98v4-mmr6, CVE-2021-23980
bleach 3.1.3GHSA-gj48-438w-jh9v, GHSA-8rfp-98v4-mmr6, CVE-2021-23980, CVE-2020-6817
bleach 3.1.2GHSA-gj48-438w-jh9v, GHSA-8rfp-98v4-mmr6, CVE-2021-23980, CVE-2020-6817
bleach 3.1.1GHSA-gj48-438w-jh9v, GHSA-8rfp-98v4-mmr6, CVE-2021-23980, CVE-2020-6817, CVE-2020-6816
bleach 3.1.0GHSA-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.