bleach vulnerabilities

An easy safelist-based HTML-sanitizing tool.

Registry
PyPI
Latest
6.4.0
License
Apache Software License

8 known advisories

The latest version, 6.4.0, is not affected by any of them. Projects on older versions may be.

Update to the latest version: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

Security advisories for bleach

  • 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
  • MediumGHSA-g75f-g53v-794x16 Jun 2026

    Bleach linkify(parse_email=True) CPU exhaustion via unbounded email regex scanning

    Affected
    6.3.0
    Fixed in
    No fix released
  • 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
  • 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
  • CriticalCVE-2018-7753GHSA-m9mq-p2f9-cfqv4 Jan 2019

    Bleach URI Scheme Restriction Bypass

    Affected
    >=2.1.0 <2.1.3
    Fixed in
    2.1.3

Is your bleach version vulnerable?

Which of your client projects still run an old bleach?

NPMscan reads the requirements.txt, poetry.lock, uv.lock and Pipfile.lock in every GitHub repo you pick and checks each installed version against these advisories, including the packages your packages pull in. Each finding comes with the command that fixes it.

Other PyPI packages

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily. Package details from the PyPI registry.