VYPR
Critical severityNVD Advisory· Published Jul 13, 2021· Updated Aug 4, 2024

CVE-2021-34552

CVE-2021-34552

Description

Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters directly into a convert function to trigger a buffer overflow in Convert.c.

AI Insight

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

Pillow/PIL convert function buffer overflow via controlled parameters allows potential memory corruption; fixed in Pillow 8.3.0.

Vulnerability

A buffer overflow vulnerability exists in the Convert.c file of Pillow (through 8.2.0) and PIL (through 1.1.7). The convert function uses sprintf without bounds checking, allowing an attacker to pass controlled parameters directly into the function and trigger a buffer overflow [1][4]. This affects all versions of Pillow up to and including 8.2.0 and PIL up to 1.1.7.

Exploitation

An attacker can exploit this vulnerability by providing crafted parameters to the convert function, typically through image processing operations that accept user-supplied arguments. No authentication is required if the application processes untrusted images. The attacker must be able to influence the parameters passed to the conversion routine, which is often possible when an application allows user-controlled image transformations [3].

Impact

Successful exploitation results in a buffer overflow, which can lead to memory corruption. This may allow an attacker to achieve arbitrary code execution or cause a denial of service, depending on the context of the application using the vulnerable library. The privilege level attained is that of the process running Pillow or PIL [2][3].

Mitigation

The vulnerability is fixed in Pillow version 8.3.0, released on 2021-07-01 [4]. Users should upgrade to Pillow 8.3.0 or later. For PIL (Python Imaging Library), no official fix exists; users are advised to migrate to Pillow. Debian LTS users can apply the patch referenced in the advisory [2]. No workaround is available for unpatched versions.

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.3.08.3.0

Affected products

12

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.