What’s Vulnerable › Vulnerabilities
CVE-2021-25292: Regular Expression Denial of Service (ReDoS) in Pillow
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.7% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-03-19 · updated 2026-06-17
- Weakness: CWE-1333
Description
An issue was discovered in Pillow before 8.1.1. The PDF parser allows a regular expression DoS (ReDoS) attack via a crafted PDF file because of a catastrophic backtracking regex.
Affected products
- python-pillow Pillow: before 8.1.1 — fixed in 8.1.1
- Pypi Pillow: before 8.1.1; 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 (+71) — fixed in 8.1.1
How to fix
Upgrade to a fixed version: python-pillow Pillow 8.1.1; Pypi Pillow 8.1.1. Check the vendor advisory for mitigations.
References
- https://pillow.readthedocs.io/en/stable/releasenotes/8.1.1.html
- https://security.gentoo.org/glsa/202107-33
- https://pillow.readthedocs.io/en/stable/releasenotes/8.1.1.html
- https://security.gentoo.org/glsa/202107-33
Get alerted when CVE-2021-25292 or the next vulnerability affects your stack