Description
An issue was discovered in Bleach 2.1.x before 2.1.3. Attributes that have URI values weren't properly sanitized if the values contained character entities. Using character entities, it was possible to construct a URI value with a scheme that was not allowed that would slide through unsanitized.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | python-bleach | 2.1.3-1 | — |
| Debian 13 | python-bleach | 2.1.3-1 | — |
| Debian 12 | python-bleach | 2.1.3-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | python-bleach | 2.1.2-1ubuntu0.1~esm1 | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-bleach | 6.1.0-1.5 | openSUSE-SU-2026:11323-1, openSUSE-SU-2024:14134-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | bleach | >= 2.1.0, < 2.1.3 | 2.1.3 | GHSA-m9mq-p2f9-cfqv |
| PyPI | bleach | >= 2.1, < 2.1.3 | 2.1.3 | PYSEC-2018-51 |
Advisories 2
- openSUSE-SU-2026:11323-1 python313-bleach-6.4.0-1.1 on GA media SUSE / openSUSE Security Updates · Jul 22, 2026
- openSUSE-SU-2024:14134-1 python310-bleach-6.1.0-1.5 on GA media SUSE / openSUSE Security Updates · May 7, 2025