CVE-2021-34552 json
Buffer Overflow in Pillow
published 2021-07-13 5 y ago modified 2026-09-08 2 mo ago also BIT-pillow-2021-34552 , EUVD-2021-0171 , GHSA-7534-mm45-c74v , PYSEC-2021-331
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.2%
- EPSS 3.2% chance of exploitation in 30 days, percentile 88%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi pillow 8.3.0
- bitnami pillow 1.1.8, 8.2.1
- pillow Debian 14, Debian 13, Debian 12 8.1.2+dfsg-0.3
debian advisories DEBIAN-CVE-2021-34552
- pillow Ubuntu 18.04 LTS 5.1.0-1ubuntu0.7
- pillow Ubuntu 20.04 LTS 7.0.0-4ubuntu0.5
- pillow Ubuntu Pro 14.04 LTS 2.3.0-1ubuntu3.4+esm3
- pillow Ubuntu Pro 16.04 LTS 3.1.2-0ubuntu1.6+esm1
ubuntu advisories UBUNTU-CVE-2021-34552
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-pillow RHEL 8 5.1.1-16.el8
- python3-pillow RHEL 8 5.1.1-16.el8
red hat advisories RHSA-2021:4149
- python-Pillow SLE Module for Package Hub 15 SP6, openSUSE Leap 15.5 7.2.0-150300.3.15.1
- python-Pillow OpenStack Cloud Crowbar 8, OpenStack Cloud 8, HPE Helion OpenStack 8 4.2.1-3.17.1
- python-Pillow OpenStack Cloud Crowbar 9, OpenStack Cloud 9 5.2.0-3.11.1
- python-Pillow OpenStack Cloud 7 2.8.1-4.25.1
suse advisories SUSE-SU-2024:1673-2SUSE-SU-2024:1673-1SUSE-SU-2021:2632-1SUSE-SU-2021:2631-1SUSE-SU-2021:2595-1
- python-Pillow openSUSE Tumbleweed 12.3.0-1.1
- python-Pillow openSUSE Tumbleweed 8.3.2-1.2
- python-Pillow openSUSE Tumbleweed 10.3.0-1.1
- python-Pillow openSUSE Leap 15.2 8.3.1-lp152.5.3.1
- python-CairoSVG openSUSE Leap 15.2 2.5.1-lp152.2.3.1
opensuse advisories openSUSE-SU-2026:11261-1openSUSE-SU-2024:11209-1openSUSE-SU-2024:13827-1openSUSE-SU-2021:1134-1
- python3-pillow AlmaLinux 8 5.1.1-16.el8
almalinux advisories ALSA-2021:4149
- python-pillow Rocky Linux 8 5.1.1-16.el8
rocky linux advisories RLSA-2021:4149
- py3-pillow Alpine 3.24, Alpine 3.23, Alpine 3.22 +7 more 8.3.0-r0
alpine advisories ALPINE-CVE-2021-34552
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-pillow Arch Linux 8.3.0-1
arch linux advisories AVG-2150
- github.com/python-pillow/Pillow@31c4738 commit
- github.com/python-pillow/Pillow#5567 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-34552 updated cvss 5.9
python-pillow: Buffer overflow in image convert function
-
Red Hat Enterprise Linux 7 python-pillow, python-pillow-qt, python-pillow-tk, python-pillow-saneaffected: workaround, no fix planned “Out of support scope”
-
Red Hat Quay v3 quay/quay-rhel8 v3.6.0-62fixed: vendor fix RHSA-2021:3917
-
Red Hat Enterprise Linux AppStream (v. 8) python-pillow 5.1.1-16.el8, python3-pillow 5.1.1-16.el8fixed: vendor fix RHSA-2021:4149
-
Red Hat Quay v3 quay/clair-rhel8 v3.6.0-70, quay/quay-builder-rhel8 v3.6.0-44, quay/quay-operator-rhel8 v3.6.0-43, quay/quay-operator-bundle v3.6.0-48, quay/quay-bridge-operator-rhel8 v3.6.0-40, quay/quay-bridge-operator-bundle v3.6.0-35, +3 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
3.19% chance of exploitation in the next 30 days, higher than 88% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pillow | <8.3.0 |
8.3.0 |
| bitnami | pillow | >=1.0.0, <1.1.8 >=1.2.0, <8.2.1 |
1.1.8 8.2.1 |
Classification
- Weakness
-
- CWE-120 Buffer Copy without Checking Size of Input
References
-
github.com
/python-pillow/Pillow/pull/5567
web
-
github.com
/python-pillow/Pillow/commit/31c473898c29d1b7cb6555ce67d9503a4906b83f
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/7V6LCG525ARIX6LX5QRYNAWVDD2MD2SV/
vendor-advisory, web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/VUGBBT63VL7G4JNOEIPDJIOC34ZFBKNJ/
vendor-advisory, web
-
security.gentoo.org
/glsa/202211-10
vendor-advisory, web, third-party-advisory, advisory
-
pillow.readthedocs.io
/en/stable/releasenotes/index.html
web, release-notes, vendor-advisory, advisory
-
pillow.readthedocs.io
/en/stable/releasenotes/8.3.0.html#buffer-overflow
web, release-notes, vendor-advisory, advisory
-
lists.debian.org
/debian-lts-announce/2021/07/msg00018.html
mailing-list, web, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-34552
advisory, web
-
github.com
/advisories/GHSA-7534-mm45-c74v
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2021-331.yaml
web
-
github.com
/python-pillow/Pillow
package
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/7V6LCG525ARIX6LX5QRYNAWVDD2MD2SV
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/VUGBBT63VL7G4JNOEIPDJIOC34ZFBKNJ
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/7V6LCG525ARIX6LX5QRYNAWVDD2MD2SV/
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/VUGBBT63VL7G4JNOEIPDJIOC34ZFBKNJ/
web
Sources
- CVE List CVE-2021-34552
- GitHub Advisory GHSA-7534-mm45-c74v
- NVD CVE-2021-34552
- OSV BIT-pillow-2021-34552
- OSV PYSEC-2021-331
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.