Live threats

All CVEs / Python

CVE-2021-25289Python Pillow

Critical 9.8 No auth needed

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

What happens

An issue was discovered in Pillow before 8.1.1. TiffDecode has a heap-based buffer overflow when decoding crafted YCbCr files because of certain interpretation conflicts with LibTIFF in RGBA mode. NOTE: this issue exists because of an incomplete fix for CVE-2020-35654.

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.1 8.1.1 pip install "pillow>=8.1.1"
PyPI pillow < 8.1.1 8.1.1 pip install "pillow>=8.1.1"

Per OSV / GitHub Advisories (GHSA-57h3-9rgr-c24m, PYSEC-2021-35). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
pythonpillow< 8.1.1

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.