cve.bz

CVE-2021-25289 python pillow: Out-of-bounds Write

9.8 criticalEPSS 2.3%Fix available

Critical (9.8) in python pillow. EPSS 2.3% estimated probability of exploitation activity in the next 30 days. Fixed in pillow 8.1.1.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
2.3% (unchanged from 2.3% a week ago; 2.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 84th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-787 Out-of-bounds Write
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-25289 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-25289?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-25289?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-25289 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
python:pillowbefore 8.1.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-57h3-9rgr-c24mPyPIpillow<8.1.18.1.1
PYSEC-2021-35PyPIpillow<8.1.18.1.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14pillow8.1.1-1DEBIAN-CVE-2021-25289
Ubuntu16.04:LTSpillow3.1.2-0ubuntu1.6USN-4763-1
Ubuntu18.04:LTSpillow5.1.0-1ubuntu0.5USN-4763-1
Ubuntu20.04:LTSpillow7.0.0-4ubuntu0.3UBUNTU-CVE-2021-25289 USN-4763-1
UbuntuPro:20.04:LTSpillow-python2no fix listedUBUNTU-CVE-2021-25289
SUSELinux Enterprise Module for Package Hub 15 SP6python-Pillow7.2.0-150300.3.15.1SUSE-SU-2024:1673-2
openSUSELeap 15.2python-CairoSVG2.5.1-lp152.2.3.1openSUSE-SU-2021:1134-1
openSUSELeap 15.2python-Pillow8.3.1-lp152.5.3.1openSUSE-SU-2021:1134-1
openSUSELeap 15.5python-Pillow7.2.0-150300.3.15.1SUSE-SU-2024:1673-1
openSUSETumbleweedpython-Pillow10.3.0-1.1openSUSE-SU-2024:13827-1
openSUSETumbleweedpython-Pillow12.3.0-1.1openSUSE-SU-2026:11261-1
openSUSETumbleweedpython-Pillow8.3.2-1.2openSUSE-SU-2024:11209-1
Alpinev3.14, v3.15, v3.16 and 8 morepy3-pillow8.1.2-r0ALPINE-CVE-2021-25289

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

python-pillow as shipped with Red Hat Enterprise Linux 7 and 8 are not affected by this flaw as the flaw was introduced in a newer version than shipped.

Red Hat's mitigation

Disable the invoice generation feature to mitigate this vulnerability in Red Hat Quay.

ProductPackageStateAdvisory
Red Hat Quay 3quay/quay-rhel8:v3.6.0-62Fixed 2021-10-19RHSA-2021:3917
Red Hat Enterprise Linux 7python-pillowNot affected
Red Hat Enterprise Linux 8python-pillowNot affected
Red Hat Enterprise Linux 9python-pillowNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-25289.

References

Check your stackJSON