$npx skillfedfor your agent

bleach

An easy safelist-based HTML-sanitizing tool.

SkipPyPI Python ModulesReleased Jun 202678.6M downloads / moApache Software LicensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — bleach-6.4.0-py3-none-any.whl
v6.4.0 · released 2026-06-05 · Python >=3.10 · 1 runtime deps: webencodings

No. Bleach is abandoned as of June 5, 2026 with no future security updates. While the final release includes recent XSS fixes and the codebase is stable, any new security vulnerability will never be patched. For new projects, choose an actively maintained HTML sanitizer. For existing deployments, plan a migration path and audit your threat model carefully—the lack of vendor support is a critical operational risk.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; no longer receives security updates.
  • Installation is straightforward with low friction, but the package is abandoned as of June 5, 2026, with no future maintenance or security updates planned.
  • Existing deployments should plan migration.

License · maintenance · safety

Apache Software License (permissive) — Licensed under Apache Software License (permissive), so commercial and private use are permitted, but the abandoned status means no vendor support for license-related issues.

last release 2026-06-05 (70 days) · last repo commit 2026-06-05 · 2,769 stars · archived

0 known vulnerabilities (OSV.dev, 2026-08-14) · 78,637,646 downloads/mo, #433 on PyPI

Verify before relying

pip install bleach

import bleach

bleach.clean('an <script>evil()</script> example')
bleach.linkify('an http://example.com url')
  • Whether existing security fixes in 6.4.0 (GHSA-8rfp-98v4-mmr6, GHSA-gj48-438w-jh9v) address all known attack vectors for your use case.
  • Whether the package's HTML5 parsing behavior via html5lib matches your application's security requirements after abandonment.
  • Long-term compatibility of the single runtime dependency webencodings with future Python versions.
Same gist for agents: .md · .json

What it is and what it does

Bleach is an allowed-list-based HTML sanitizer designed to clean markup from untrusted sources. It escapes or strips HTML tags and attributes that fall outside a whitelist, and can linkify plain-text URLs safely. The library relies on html5lib for parsing, so it handles malformed or quirky HTML fragments the way modern browsers do, automatically fixing unbalanced or mis-nested tags.

As of June 5, 2026, Bleach is no longer maintained and will receive no future releases, including security patches. The final version (6.4.0) includes fixes for two XSS vulnerabilities (GHSA-8rfp-98v4-mmr6 and GHSA-gj48-438w-jh9v) but represents a hard stop for the project. Existing users should treat this as a legacy dependency and plan migration to an actively maintained alternative.

Use it for

  • Sanitize user-submitted HTML in comment systems or rich-text editors to prevent XSS attacks.
  • Clean HTML email bodies or newsletter content from untrusted sources before rendering.
  • Linkify plain URLs in user-generated text while safely setting rel attributes on links.
  • Strip or escape dangerous markup in forum posts or wiki content before storage.
  • Normalize malformed HTML fragments from web scrapers or third-party APIs.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Skip

No.

Bleach is abandoned as of June 5, 2026 with no future security updates. While the final release includes recent XSS fixes and the codebase is stable, any new security vulnerability will never be patched. For new projects, choose an actively maintained HTML sanitizer. For existing deployments, plan a migration path and audit your threat model carefully—the lack of vendor support is a critical operational risk.

Install

bleach on PyPI

Before you install

Installation is straightforward with low friction, but the package is abandoned as of June 5, 2026, with no future maintenance or security updates planned. Existing deployments should plan migration.

Requires Python 3.10 or later; no longer receives security updates.

License in practice

Licensed under Apache Software License (permissive), so commercial and private use are permitted, but the abandoned status means no vendor support for license-related issues.

Quickstart

pip install bleach

import bleach

bleach.clean('an <script>evil()</script> example')
bleach.linkify('an http://example.com url')

Verify before relying

  • Whether existing security fixes in 6.4.0 (GHSA-8rfp-98v4-mmr6, GHSA-gj48-438w-jh9v) address all known attack vectors for your use case.
  • Whether the package's HTML5 parsing behavior via html5lib matches your application's security requirements after abandonment.
  • Long-term compatibility of the single runtime dependency webencodings with future Python versions.

Package facts

LicenseApache Software License permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
webencodings
MaintenanceAbandoned 70 days since the last release
Last repo commit repository archived
First released
Downloads78,637,646 / month, #433 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 7 - InactiveEnvironment :: Web EnvironmentIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules

Evidence: bleach-6.4.0-py3-none-any.whl

Tags

Capabilities
html sanitizationxss preventionhtml escapingsafe html cleaninglinkify urlsmarkup filteringuntrusted html
Topics
security-criticalabandonedhtml-sanitization

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “xss prevention”

  • bleachBleach sanitizes untrusted HTML by escaping or stripping markup and…
  • nh3nh3 sanitizes HTML by removing unsafe tags and attributes, exposing…
  • MarkupSafeMarkupSafe provides a text object that escapes special characters so…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also bleach-allowlist · django-bleach · MarkupSafe · nh3 · lxml-html-clean · django-markdownify · py_svg_hush · types-bleach · html-sanitizer · turbohtml