Skip to content
OpenAdvisories
Medium · 6.1 CVE-2021-23980 EUVD-2021-0036GHSA-vv2x-vrpj-qqpqPYSEC-2021-865

Cross-site scripting in Bleach

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

Description

A mutation XSS affects users calling bleach.clean with all of: svg or math in the allowed tags p or br in allowed tags style, title, noscript, script, textarea, noframes, iframe, or xmp in allowed tags the keyword argument strip_comments=False Note: none of the above tags are in the default allowed tags and strip_comments defaults to True.

Affected products

VendorProductAffectedFixed
Mozilla Mozilla Bleach unspecified – < 3.3.0 3.3.0

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.2.1-2.1 —
Debian 13 python-bleach 3.2.1-2.1 —
Debian 12 python-bleach 3.2.1-2.1 —
Debian 10 python-bleach 3.1.2-0+deb10u2 DSA-4892-1
Debian 9 python-bleach 2.0-1+deb9u1 DLA-2620-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
Red Hat Ansible Automation Platform 4 automation-hub +2 4.2.2-1.el7pc RHSA-2021:0781
Red Hat Ansible Automation Platform 4 python-bleach +1 3.3.0-1.el7pc RHSA-2021:0781
Red Hat Ansible Automation Platform 4 python-bleach-allowlist +1 1.0.3-1.el7pc RHSA-2021:0781
Red Hat Ansible Automation Platform 4 python-galaxy-importer +1 0.2.15-1.el7pc RHSA-2021:0781
Red Hat Ansible Automation Platform 4 python-pulp-ansible +1 1:0.5.6-1.el7pc RHSA-2021:0781
Red Hat Ansible Automation Platform 4 python3-django 2.2.18-1.el7pc RHSA-2021:0781
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
ReleasePackageFixed inAdvisory
Alpine v3.24 py3-bleach 3.3.0-r0 —
Alpine v3.23 py3-bleach 3.3.0-r0 —
Alpine v3.22 py3-bleach 3.3.0-r0 —
Alpine v3.21 py3-bleach 3.3.0-r0 —
Alpine v3.20 py3-bleach 3.3.0-r0 —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 py3-bleach 3.3.0-r0 —
Alpine v3.18 py3-bleach 3.3.0-r0 —
Alpine v3.17 py3-bleach 3.3.0-r0 —
Alpine v3.16 py3-bleach 3.3.0-r0 —
Alpine v3.15 py3-bleach 3.3.0-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI bleach < 3.3.0 3.3.0 GHSA-vv2x-vrpj-qqpq

Advisories 7

References