Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
CRITICAL severity

CVE-2021-34552 — pillow

CRITICALFix: python-pillow/Pillow#5567

CVE-2021-34552 is a critical-severity (CVSS 9.8) CWE-120 vulnerability in pillow. A fix is available for pillow — see the affected versions and patch details below.

Buffer Overflow in Pillow

Also known asBIT-pillow-2021-34552GHSA-7534-mm45-c74vPYSEC-2021-331
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
3.2%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs88th percentile — riskier than 88% of all scored CVEsHighest risk
0.00%1.35%2.70%4.04%0.3%3.2%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2021-34552 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,386 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🐍pillow

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

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 Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIpillowall versions8.3.0pip install --upgrade 'pillow==8.3.0'

Affected Products

3 products · 5 configurations
OS
debian linuxdebian
1 version
9.0
OS
fedorafedoraproject
2 versions
3334
Application
pillowpython
≥ 1.2 && ≤ 8.2.0
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for pillow, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update pillow to 8.3.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-34552 is resolved across your whole dependency graph.

  3. Workarounds

    Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

Due to the compiler options used, the buffer overflow is detected and the impact is lowered to a crash only. Additionally, the "mode" parameter has to be attacker controlled, which is considered a rare case.

Workaround published by Red Hat
To mitigate this flaw on Red Hat Quay, keep the invoice generation feature disabled, as it is by default. Red Hat Satellite 6.9 customers can apply following hotfix to eliminate the vulnerability warnings. * Download python2-daemon-2.1.2-7.1.HFRHBZ1998199.el7sat.noarch.rpm from https://bugzilla.redhat.com/attachment.cgi?id=1819471 * Stop services: # satellite-maintain service stop * Upgrade python2-daemon and remove affected package # rpm -Uvh python2-daemon-2.1.2-7.1.HFRHBZ1998199.el7sat.noarch.rpm # yum remove python-pillow * Restart services: # satellite-maintain service start Satellite 6.10 future release is also fixing this.
Source: Red Hat security advisory for CVE-2021-34552 (CC BY 4.0)
ProductFixed inAdvisory
Red Hat Enterprise Linux 8python-pillow-0:5.1.1-16.el8RHSA-2021:4149
Red Hat Quay 3quay/quay-rhel8:v3.6.0-62RHSA-2021:3917

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2021-34552 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2021-34552: pillow — Fixed in 8.3.0