CVE-2021-34552 Buffer Overflow in Pillow

Critical 9.8 Published Updated

Attackers can trigger a buffer overflow in Pillow's convert function via controlled parameters, potentially leading to code execution or crashes.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-34552?

CVE-2021-34552 is a critical memory corruption vulnerability in Debian Debian Linux, published on 13 Jul 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-120

Which versions are affected by CVE-2021-34552?

4 open source packages ship an affected version, including pillow. It affects 3 products.

PackageAffectedFixed in
pillow BitnamiFrom 1.0.01.1.8, 8.2.1
pillow PyPIAll versions8.3.0
pillow PyPIAll versions8.3.0
pillow PyPIAll versions8.3.0
Linux distribution packages (6)
python-Pillow SUSE:HPE Helion OpenStack 8All versions4.2.1-3.17.1
python-Pillow SUSE:OpenStack Cloud 7All versions2.8.1-4.25.1
python-Pillow SUSE:OpenStack Cloud 8All versions4.2.1-3.17.1
python-Pillow SUSE:OpenStack Cloud 9All versions5.2.0-3.11.1
python-Pillow SUSE:OpenStack Cloud Crowbar 8All versions4.2.1-3.17.1
python-Pillow SUSE:OpenStack Cloud Crowbar 9All versions5.2.0-3.11.1

Products include Debian Debian Linux, Fedoraproject Fedora, Python Pillow.

How do I fix CVE-2021-34552?

Upgrade pillow to a fixed version for your release line: 1.1.8, 8.2.1 or 8.3.0.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-34552 being exploited?

There is no known exploitation of CVE-2021-34552 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2021-34552, BIT-pillow-2021-34552, DEBIAN-CVE-2021-34552, GHSA-7534-mm45-c74v, PYSEC-2021-331, ROOT-APP-PYPI-CVE-2021-34552 and 4 more.

Is CVE-2021-34552 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free