# CVE-2021-23980: Cross-site scripting in Bleach

- Severity: Medium 6.1 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.49%, higher than 43% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-02-02T17:58:00.000Z
- Modified: 2026-07-08T06:27:25.981Z
- Also known as: GHSA-vv2x-vrpj-qqpq, PYSEC-2021-865
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- Mozilla Mozilla Bleach: from unspecified before 3.3.0
- bleach (PyPI): before 3.3.0; before 79b7a3c5e56a09d1d323a5006afa59b56162eb13
- mozilla bleach: before 3.3.0

## Every score

- CISA-ADP: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://bugzilla.mozilla.org/show_bug.cgi?id=CVE-2021-23980> (exploit, issue-tracking, web)
- <https://github.com/mozilla/bleach/security/advisories/GHSA-vv2x-vrpj-qqpq> (advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23980> (advisory)
- <https://github.com/mozilla/bleach/commit/79b7a3c5e56a09d1d323a5006afa59b56162eb13> (fix, web)
- <https://advisory.checkmarx.net/advisory/CX-2021-4303> (advisory, web)
- <https://bugzilla.mozilla.org/show_bug.cgi?id=1689399> (web)
- <https://cure53.de/fp170.pdf> (web)
- <https://github.com/mozilla/bleach> (package)
- <https://github.com/mozilla/bleach/blob/79b7a3c5e56a09d1d323a5006afa59b56162eb13/CHANGES#L4> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/bleach/PYSEC-2021-865.yaml> (web)
- <https://pypi.org/project/bleach> (web)

## Sources

- CVE List: [CVE-2021-23980](https://www.cve.org/CVERecord?id=CVE-2021-23980), CVE Terms of Use, modified 2025-03-19
- GitHub Advisory Database: [GHSA-vv2x-vrpj-qqpq](https://github.com/advisories/GHSA-vv2x-vrpj-qqpq), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-23980](https://nvd.nist.gov/vuln/detail/CVE-2021-23980), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-865](https://osv.dev/vulnerability/PYSEC-2021-865), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2021-23980 · Whole record: https://cve.day/CVE-2021-23980.json · Rebuilt by cve.day 2026-11-25T22:58:08.212Z
