Skip to content
OpenAdvisories
High · 7.5 CVE-2020-6817 EUVD-2020-0056GHSA-vqhp-cxgc-6wmmPYSEC-2020-340SNYK-PYTHON-BLEACH-561754

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

Published Feb 16, 2023 · Updated Mar 19, 2025 · Assigned by mozilla

Description

bleach.clean behavior parsing style attributes could result in a regular expression denial of service (ReDoS). Calls to bleach.clean with an allowed tag with an allowed style attribute are vulnerable to ReDoS. For example, bleach.clean(..., attributes={'a': ['style']}).

Affected products

VendorProductAffectedFixed
Mozilla Mozilla Bleach unspecified – < 3.1.4 3.1.4

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.

ReleasePackageFixed inAdvisory
Debian 14 python-bleach 3.1.4-1 —
Debian 13 python-bleach 3.1.4-1 —
Debian 12 python-bleach 3.1.4-1 —
Debian 8 python-bleach 1.4-1+deb8u1 DLA-2167-1
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS python-bleach 3.1.1-1ubuntu0.1~esm1 —
Ubuntu Pro 18.04 LTS python-bleach 2.1.2-1ubuntu0.1~esm1 —
Ubuntu Pro 16.04 LTS python-bleach 1.4.2-1ubuntu0.1~esm1 —
ReleasePackageFixed inAdvisory
SUSE Package Hub 15 SP2 python-bleach 3.1.5-bp152.2.4.1 openSUSE-SU-2021:0571-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-bleach 6.1.0-1.5 openSUSE-SU-2026:11323-1, openSUSE-SU-2024:14134-1
openSUSE Leap 15.2 python-bleach 3.1.5-lp152.2.3.1 openSUSE-SU-2021:0552-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI bleach < 3.1.4 3.1.4 GHSA-vqhp-cxgc-6wmm

Advisories 5

References