What’s Vulnerable › Vulnerabilities
CVE-2021-34552: Buffer Overflow in Pillow
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 3.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-07-13 · updated 2026-06-17
- Weakness: CWE-120
Description
Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters directly into a convert function to trigger a buffer overflow in Convert.c.
Affected products
- Debian Linux: 9.0
- Fedoraproject Fedora: 33, 34
- python-pillow Pillow: from 1.0 through 1.1.7; from 1.2 through 8.2.0
- Pypi Pillow: before 8.3.0; 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 (+74) — fixed in 8.3.0
How to fix
Upgrade to a fixed version: Pypi Pillow 8.3.0. Check the vendor advisory for mitigations.
References
- https://lists.debian.org/debian-lts-announce/2021/07/msg00018.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7V6LCG525ARIX6LX5QRYNAWVDD2MD2SV/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VUGBBT63VL7G4JNOEIPDJIOC34ZFBKNJ/
- https://pillow.readthedocs.io/en/stable/releasenotes/8.3.0.html#buffer-overflow
- https://pillow.readthedocs.io/en/stable/releasenotes/index.html
- https://security.gentoo.org/glsa/202211-10
- https://lists.debian.org/debian-lts-announce/2021/07/msg00018.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7V6LCG525ARIX6LX5QRYNAWVDD2MD2SV/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VUGBBT63VL7G4JNOEIPDJIOC34ZFBKNJ/
- https://pillow.readthedocs.io/en/stable/releasenotes/8.3.0.html#buffer-overflow
- https://pillow.readthedocs.io/en/stable/releasenotes/index.html
- https://security.gentoo.org/glsa/202211-10
Get alerted when CVE-2021-34552 or the next vulnerability affects your stack