VYPR
High severityNVD Advisory· Published Mar 19, 2021· Updated Aug 3, 2024

CVE-2021-25290

CVE-2021-25290

Description

An issue was discovered in Pillow before 8.1.1. In TiffDecode.c, there is a negative-offset memcpy with an invalid size.

AI Insight

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

In Pillow before 8.1.1, a negative-offset memcpy in TiffDecode.c can cause memory corruption or crash.

Vulnerability

Overview

CVE-2021-25290 is a memory corruption vulnerability in Pillow, the Python Imaging Library, before version 8.1.1. The issue resides in the file TiffDecode.c, where a negative-offset memcpy operation is performed with an invalid size, leading to out-of-bounds memory access [1][2].

Exploitation and

Attack Surface

An attacker can exploit this vulnerability by crafting a malicious TIFF image file that triggers the flawed decoding logic. No authentication is required, and the attack vector is local: the victim simply needs to open the crafted file using Pillow's TIFF decoder [2]. This makes it easily exploitable in scenarios where users process untrusted image files, such as web applications or email attachments.

Impact

If successfully exploited, the vulnerability can cause a denial of service (DoS) due to application crash. More critically, the memory corruption could potentially be leveraged for arbitrary code execution, depending on the system's memory layout and the attacker's ability to control the corrupted data [2].

Mitigation

Pillow version 8.1.1 includes a fix for this issue. Users are strongly advised to update to this version or later. The fix addresses the negative-offset and size validation in the TIFF decoding routine [1][3]. The official Pillow repository contains the source code fix [4]. As this vulnerability was disclosed in 2021 and a patch is available, it is recommended to apply it promptly.

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

Affected products

12

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

8

News mentions

0

No linked articles in our index yet.