Cross-site scripting in Mozilla Bleach
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Mozilla | Mozilla Bleach | before 3.3.0 | 3.3.0 | Patch available | CNA |
| — | bleach (PyPI) | before 3.3.0 | 3.3.0 | Patch available | GHSA-vv2x-vrpj-qqpq |
- Mozilla Bleach VendorMozilla Affected before 3.3.0 Fixed in 3.3.0 Patch available CNA
- bleach (PyPI) Vendor— Affected before 3.3.0 Fixed in 3.3.0 Patch available GHSA-vv2x-vrpj-qqpq
Remediation
- Fix · CNA Mozilla Bleach (Mozilla) Fixed in 3.3.0
- Fix · GHSA-vv2x-vrpj-qqpq bleach (PyPI) Fixed in 3.3.0 Advisory →
Red Hat 1 advisory
- RHSA-2021:0781 Released 2021-03-09 · Red Hat rating ModerateRed Hat Ansible Automation Platform 1.2.2 security and bug fix update
- Red Hat Automation Hub 4.2 for RHEL 7 automation-hub-4.2.2-1.el7pc, python-bleach-3.3.0-1.el7pc, python-bleach-allowlist-1.0.3-1.el7pc +9
- Red Hat Automation Hub 4.2 for RHEL 8 automation-hub-4.2.2-1.el8pc, python-bleach-3.3.0-1.el8pc, python-bleach-allowlist-1.0.3-1.el8pc +9
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Automation Hub 4.2 for RHEL 7 | Fixed | RHSA-2021:0781 |
| Red Hat Automation Hub 4.2 for RHEL 8 | Fixed | RHSA-2021:0781 |
Timeline
- 2026-10-02 Threatist record created from CVE-2021-23980
- 2026-10-03 Alias added: GHSA-vv2x-vrpj-qqpq
References
Advisory 2
Other 8
- https://github.com/mozilla/bleach/commit/79b7a3c5e56a09d1d323a5006afa59b56162eb13
- https://advisory.checkmarx.net/advisory/CX-2021-4303
- https://bugzilla.mozilla.org/show_bug.cgi?id=1689399
- https://cure53.de/fp170.pdf
- https://github.com/mozilla/bleach
- https://github.com/mozilla/bleach/blob/79b7a3c5e56a09d1d323a5006afa59b56162eb13/CHANGES#L4
- https://github.com/pypa/advisory-database/tree/main/vulns/bleach/PYSEC-2021-865.yaml
- https://pypi.org/project/bleach
More Mozilla Bleach vulnerabilities
- TI-2020-05527 Regular expression denial of service in Mozilla Bleach CVSS 3.1HIGH 7.5
- TI-2018-05596 An issue was discovered in Bleach 2.1.x before 2.1.3. CVSS 3.0CRITICAL 9.8
- TI-2020-05512 Cross-site scripting in Mozilla Bleach CVSS 3.1MEDIUM 6.1
- TI-2020-05526 Cross-site scripting in Mozilla Bleach CVSS 3.1MEDIUM 6.1
Sources
- CVE-2021-23980 · CVE Program
- CVE-2021-23980 · NVD
- FIRST EPSS
- GHSA-vv2x-vrpj-qqpq · GitHub Advisory Database · CC BY 4.0
- CVE-2021-23980 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences