VYPR
High severityNVD Advisory· Published Jan 12, 2021· Updated Aug 4, 2024

CVE-2020-35654

CVE-2020-35654

Description

In Pillow before 8.1.0, TiffDecode has a heap-based buffer overflow when decoding crafted YCbCr files because of certain interpretation conflicts with LibTIFF in RGBA mode.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Heap buffer overflow in Pillow TiffDecode when processing crafted YCbCr TIFF images due to libtiff RGBA mode interpretation conflicts, fixed in 8.1.0.

CVE-2020-35654 is a heap-based buffer overflow vulnerability in the Pillow Python imaging library, specifically in the TiffDecode component. The root cause is a conflict in how libtiff interprets YCbCr color space data when Pillow reads strips in RGBA mode. Prior to Pillow 8.1.0, the ReadStrip function directly called libtiff's RGBA decoding for YCbCr images without properly validating the output buffer size, leading to an out-of-bounds write [1].

Exploitation requires an attacker to provide a specially crafted TIFF file with YCbCr photometric data. When Pillow attempts to decode the image, the heap buffer overflow occurs. No authentication or special network position is needed beyond convincing a user or application to process the malicious file. The attack vector is local (file-based) with low complexity [2].

The impact is a heap overflow that could corrupt adjacent memory, potentially leading to denial of service or arbitrary code execution in the context of the affected application [3]. The vulnerability is rated with a CVSS base score of 7.8 (High) [2].

The flaw was addressed in Pillow version 8.1.0. The fix rewrites the YCbCr decoding path to wrap the TIFF in a TIFFRGBAImage structure, relying on libtiff's own handling of subsampling and conversion, and adding explicit size and overflow checks [1]. Users should upgrade to Pillow >= 8.1.0. Fedora and other distributions have released updated packages [3].

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
pillowPyPI
< 8.1.08.1.0

Affected products

8

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

13

News mentions

0

No linked articles in our index yet.