Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
6.9

CVE-2021-23980: Bleach library fails to prevent XSS in certain user inputs

CVE-2021-23980 · published 3 years ago
Summary

The Bleach library has a security flaw that can allow hackers to inject malicious code into web pages. This is particularly concerning when users input data is cleaned with certain settings. If you use Bleach, make sure to check your configuration to ensure you're not vulnerable. Update to the latest version if necessary.

What to do
  • Update will kahn-greene bleach to version 3.3.0.
  • Update mozilla bleach to version 3.3.0 or later.
Affected software
Ecosystem VendorProductAffected versions
pip will kahn-greene bleach < 3.3.0
Fix: upgrade to 3.3.0
– mozilla bleach < 3.3.0
cpe:2.3:a:mozilla:bleach:*:*:*:*:*:*:*:*
Original advisory text
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 ...
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.
Fix within
Internet-facing 60 days
Internal At next upgrade
  • Not known to be exploited
  • Needs hands-on effort to exploit
  • Gives an attacker partial control
Severity
6.9 Medium
Exploitation
<1% chance of attack within 30 days
Type
CWE-79Cross-site Scripting (XSS)
Timeline
Published16 Feb 2023
Updated4 Nov 2026
First seen6 Mar 2026
Sources
Track software like this
Free during beta