Vulnerability GHSA-vqhp-cxgc-6wmm
High Risk
HIGH RISK
CVSS Score: 7.5
Score Range: 7.0–8.9
High severity vulnerabilities (CVSS 7.0–8.9). Serious vulnerabilities that should be prioritized soon after critical fixes.
6 years ago
March 30, 2020 at 07:45 PM UTC
regular expression denial-of-service (ReDoS) in Bleach
0.1 - 3.1.3
0.1 - 3.1.3
Summary
regular expression denial-of-service (ReDoS) in Bleach
Details
Impact
bleach.clean behavior parsing style attributes could result in a regular expression denial of service (ReDoS).
Calls to bleach.clean with an allowed tag with an allowed style attribute are vulnerable to ReDoS. For example, bleach.clean(..., attributes={'a': ['style']}).
Patches
3.1.4
Workarounds
-
do not whitelist the style attribute in
bleach.cleancalls -
limit input string length
References
- https://bugzilla.mozilla.org/show_bug.cgi?id=1623633
- https://www.regular-expressions.info/redos.html
- https://blog.r2c.dev/posts/finding-python-redos-bugs-at-scale-using-dlint-and-r2c/
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-6817
Credits
- Reported by schwag09 of r2c
For more information
If you have any questions or comments about this advisory:
- Open an issue at https://github.com/mozilla/bleach/issues
- Email us at [email protected]
Related Vulnerabilities
Other vulnerabilities affecting the same packages
Medium Risk
5 months ago
Bleach clean() / Cleaner() fails to sanitize dangerous URI schemes in allowed formaction attributes
0.1 - 6.3.0 GHSA-gj48-438w-jh9v
0.1 - 6.3.0 GHSA-gj48-438w-jh9v
Medium Risk
5 months ago
Bleach linkify(parse_email=True) CPU exhaustion via unbounded email regex scanning
6.3.0 GHSA-g75f-g53v-794x
6.3.0 GHSA-g75f-g53v-794x
Low Risk
5 months ago
Bleach: URI sanitization allows disallowed URI schemes with Unicode > U+00A0 in output
0.1 - 6.3.0 GHSA-8rfp-98v4-mmr6
0.1 - 6.3.0 GHSA-8rfp-98v4-mmr6
Medium Risk
5 years ago
Cross-site scripting in Bleach
0.1 - 3.2.3 GHSA-vv2x-vrpj-qqpq
0.1 - 3.2.3 GHSA-vv2x-vrpj-qqpq
Unknown
5 years ago
No summary available
0.1 - 3.2.3 PYSEC-2021-865
0.1 - 3.2.3 PYSEC-2021-865
Impacted packages
Timeline
Published
6 years ago
March 30, 2020 at 07:45 PM UTC
Fixed (3.1.4)
6 years ago
March 26, 2020 at 02:39 PM UTC
Last Modified
2 months ago
September 10, 2026 at 03:48 AM UTC