Live threats

All CVEs / Python

CVE-2021-27921Python Pillow

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
3.2%
probability of exploitation in 30 days · percentile 89
Auth required
No
Published
Mar 3, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-20
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Pillow.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI pillow < 8.1.2 8.1.2 pip install "pillow>=8.1.2"
PyPI pillow < 8.1.1 8.1.1 pip install "pillow>=8.1.1"

Per OSV / GitHub Advisories (GHSA-f4w8-cv6p-x6r5, PYSEC-2021-40). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
pythonpillow< 8.1.1
fedoraprojectfedora32
fedoraprojectfedora33
fedoraprojectfedora34

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.