CVE-2021-27921 Pillow Denial of Service by Uncontrolled Resource Consumption

High 7.5 Published Updated

Attackers can cause denial of service via memory exhaustion in Pillow by exploiting improper size checks in BLP containers.

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-27921?

CVE-2021-27921 is a high-severity denial of service vulnerability in Fedoraproject Fedora, published on 3 Mar 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Pillow before 8.1.2 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not properly checked for a BLP container, and thus an attempted memory allocation can be very large.

Weakness: CWE-20

Which versions are affected by CVE-2021-27921?

4 open source packages ship an affected version, including pillow and Pillow. It affects 2 products.

PackageAffectedFixed in
pillow BitnamiAll versions8.1.1
pillow PyPIAll versions8.1.1
pillow PyPIAll versions8.1.2
Pillow PyPIAll versions8.1.2

Products include Fedoraproject Fedora, Python Pillow.

How do I fix CVE-2021-27921?

Upgrade pillow to a fixed version for your release line: 8.1.1 or 8.1.2.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2021-27921 being exploited?

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

All Fedoraproject Fedora vulnerabilities

Sources

Also known as ALPINE-CVE-2021-27921, BIT-pillow-2021-27921, DEBIAN-CVE-2021-27921, GHSA-f4w8-cv6p-x6r5, PYSEC-2021-40, ROOT-APP-PYPI-CVE-2021-27921 and 1 more.

Is CVE-2021-27921 in your software?

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

Check your SBOMs for free