CVE-2020-6817
HIGH7.5EPSS 0.58%regular expression denial-of-service (ReDoS) in Bleach
Published: 3/30/2020Modified: 4/28/2026
Description
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']}).
Affected packages (4)
- Debian/python-bleachfrom 0, < 3.1.4-1
- Debian/python-bleachfrom 0, < 1.4-1+deb8u1
- PyPI/bleachfrom 0, < 3.1.4
- PyPI/bleachfrom 0, < 3.1.4
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 4.0 | — | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| osv | CVSS 3.1 | HIGH7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
References (9)
- ADVISORYhttps://blog.r2c.dev/posts/finding-python-redos-bugs-at-scale-using-dlint-and-r2c/
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2020-6817
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2020-6817
- PATCHhttps://github.com/mozilla/bleach
- WEBhttps://bugzilla.mozilla.org/show_bug.cgi?id=1623633
- WEBhttps://github.com/mozilla/bleach/releases/tag/v3.1.4
- WEBhttps://github.com/mozilla/bleach/security/advisories/GHSA-vqhp-cxgc-6wmm
- WEBhttps://github.com/pypa/advisory-database/tree/main/vulns/bleach/PYSEC-2020-340.yaml
- WEBhttps://snyk.io/vuln/SNYK-PYTHON-BLEACH-561754