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.
| Package | Affected versions | Patched versions |
|---|---|---|
pillowPyPI | < 8.1.0 | 8.1.0 |
Affected products
8- Pillow/Pillowdescription
- osv-coords7 versionspkg:bitnami/pillowpkg:pypi/pillowpkg:rpm/opensuse/python-CairoSVG&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/python-Pillow&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/python-Pillow&distro=openSUSE%20Leap%2015.5pkg:rpm/opensuse/python-Pillow&distro=openSUSE%20Tumbleweedpkg:rpm/suse/python-Pillow&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP6
< 8.1.0+ 6 more
- (no CPE)range: < 8.1.0
- (no CPE)range: < 8.1.0
- (no CPE)range: < 2.5.1-lp152.2.3.1
- (no CPE)range: < 8.3.1-lp152.5.3.1
- (no CPE)range: < 7.2.0-150300.3.15.1
- (no CPE)range: < 8.3.2-1.2
- (no CPE)range: < 7.2.0-150300.3.15.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
13- github.com/advisories/GHSA-vqcj-wrf2-7v73ghsaADVISORY
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6BYVI5G44MRIPERKYDQEL3S3YQCZTVHE/mitrevendor-advisoryx_refsource_FEDORA
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BF553AMNNNBW7SH4IM4MNE4M6GNZQ7YD/mitrevendor-advisoryx_refsource_FEDORA
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TQQY6472RX4J2SUJENWDZAWKTJJGP2ML/mitrevendor-advisoryx_refsource_FEDORA
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZTSY25UJU7NJUFHH3HWT575LT4TDFWBZ/mitrevendor-advisoryx_refsource_FEDORA
- nvd.nist.gov/vuln/detail/CVE-2020-35654ghsaADVISORY
- github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2021-70.yamlghsaWEB
- github.com/python-pillow/Pillow/commit/eb8c1206d6b170d4e798a00db7432e023853da5cghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6BYVI5G44MRIPERKYDQEL3S3YQCZTVHEghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BF553AMNNNBW7SH4IM4MNE4M6GNZQ7YDghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TQQY6472RX4J2SUJENWDZAWKTJJGP2MLghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZTSY25UJU7NJUFHH3HWT575LT4TDFWBZghsaWEB
- pillow.readthedocs.io/en/stable/releasenotes/index.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.