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

CVE-2020-35655

CVE-2020-35655

Description

In Pillow before 8.1.0, SGIRleDecode has a 4-byte buffer over-read when decoding crafted SGI RLE image files because offsets and length tables are mishandled.

AI Insight

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

Pillow before 8.1.0 has a 4-byte buffer over-read in SGIRleDecode when decoding crafted SGI RLE images due to unsanitized offsets and length tables.

Vulnerability

Overview

In Pillow before version 8.1.0, the SGIRleDecode function mishandles offsets and length tables when processing SGI RLE image files, leading to a 4-byte buffer over-read [1][2]. The root cause is that the decoder reads offset and length entries from the file header without validating that the total space required for these tables fits within the allocated buffer, allowing an attacker to craft an image with malicious table sizes that cause out-of-bounds reads [4].

Exploitation

Conditions

An attacker can exploit this vulnerability by providing a specially crafted SGI RLE image file to a Pillow-based application. No authentication or special privileges are required if the application processes user-supplied images, as the vulnerability can be triggered through standard image loading functions such as Image.open() [1]. The attack complexity is low, as the crafted file is the only requirement.

Impact

Successful exploitation results in reading up to 4 bytes beyond the allocated buffer boundary. This memory disclosure could leak sensitive information from adjacent memory regions [1][2]. While the over-read is limited in size, it may be leveraged by an attacker as part of a broader attack chain to achieve information disclosure or potentially cause a crash, depending on application context.

Mitigation

Pillow fixed the issue in version 8.1.0 by adding proper size checks before allocating starttab and lengthtab arrays [4]. Users are strongly advised to upgrade to Pillow 8.1.0 or later. As of early 2021, the vulnerability was patched and listed in the PyPA advisory database, but no evidence suggests active exploitation in the wild [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
>= 4.3.0, < 8.1.08.1.0

Affected products

9

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

10

News mentions

0

No linked articles in our index yet.