Skip to content
Fencer Vulns
medium 6.1

CVE-2021-23980 json

Cross-site scripting in Bleach

published 2021-02-02 5 y ago modified 2026-07-08 4 mo ago also GHSA-vv2x-vrpj-qqpq , PYSEC-2021-865 , EUVD-2021-0036

cvss
6.1
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.5%
EPSS 0.5% chance of exploitation in 30 days, percentile 41%
public exploits
0
none known

Summary

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.

Patch / fix

  • pypi bleach 3.3.0
  • Mozilla Mozilla Bleach 3.3.0
  • python-bleach Debian 14, Debian 13, Debian 12 3.2.1-2.1

debian advisories DEBIAN-CVE-2021-23980

  • python-bleach Ubuntu Pro 16.04 LTS 1.4.2-1ubuntu0.1~esm1
  • python-bleach Ubuntu Pro 18.04 LTS 2.1.2-1ubuntu0.1~esm1
  • python-bleach Ubuntu Pro 20.04 LTS 3.1.1-1ubuntu0.1~esm1

ubuntu advisories UBUNTU-CVE-2021-23980

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python-bleach ansible automation platform 4.2 3.3.0-1.el7pc
  • python-bleach ansible automation platform 4.2 3.3.0-1.el8pc
  • automation-hub ansible automation platform 4.2 4.2.2-1.el7pc
  • automation-hub ansible automation platform 4.2 4.2.2-1.el8pc
  • python3-bleach ansible automation platform 4.2 3.3.0-1.el7pc
  • python3-bleach ansible automation platform 4.2 3.3.0-1.el8pc
  • python3-django ansible automation platform 4.2 2.2.18-1.el7pc
  • python3-django ansible automation platform 4.2 2.2.18-1.el8pc

red hat advisories RHSA-2021:0781

  • python-bleach openSUSE Tumbleweed 6.4.0-1.1
  • python-bleach openSUSE Tumbleweed 6.1.0-1.5
  • python-bleach Package Hub 15 SP2 3.1.5-bp152.2.4.1
  • python-bleach openSUSE Leap 15.2 3.1.5-lp152.2.3.1

opensuse advisories openSUSE-SU-2026:11323-1openSUSE-SU-2024:14134-1openSUSE-SU-2021:0571-1openSUSE-SU-2021:0552-1

  • py3-bleach Alpine 3.24, Alpine 3.23, Alpine 3.22 +7 more 3.3.0-r0

alpine advisories ALPINE-CVE-2021-23980

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-23980 updated cvss 6.1

python-bleach: Mutation cross-site scripting in bleach.clean

  • Red Hat Automation Hub 4.2 for RHEL 7 python-bleach 3.3.0-1.el7pc, automation-hub 4.2.2-1.el7pc, python3-bleach 3.3.0-1.el7pc, python3-django 2.2.18-1.el7pc, python-galaxy-ng 4.2.2-1.el7pc, python3-galaxy-ng 4.2.2-1.el7pc, +6 more Red Hat Automation Hub 4.2 for RHEL 8 python-bleach 3.3.0-1.el8pc, automation-hub 4.2.2-1.el8pc, python3-bleach 3.3.0-1.el8pc, python3-django 2.2.18-1.el8pc, python-galaxy-ng 4.2.2-1.el8pc, python3-galaxy-ng 4.2.2-1.el8pc, +6 more
    fixed: vendor fix RHSA-2021:0781

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
partial
Assessed
19 mo ago

Exploit prediction

0.48% chance of exploitation in the next 30 days, higher than 41% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • bugzilla.mozilla.org https://bugzilla.mozilla.org/show_bug.cgi?id=CVE-2021-23980 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CISA ADP 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CNA 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected packages

ecosystem package affected fixed in
pypi bleach
<3.3.0
3.3.0

Affected products

  • Mozilla Mozilla Bleach

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.