Heap-based buffer overflow in Pillow - CVE-2026-59199

 

Heap-based buffer overflow in Pillow - CVE-2026-59199

Published: July 7, 2026


Vulnerability identifier: #VU137003
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2026-59199
CWE-ID: CWE-122
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Alex Clark and Contributors
Affected software:
Pillow

Detailed vulnerability description

The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to a heap-based buffer overflow in Pillow Image.paste(), Image.crop(), and Image.alpha_composite() when processing attacker-controlled image coordinates near signed 32-bit integer limits. A remote attacker can supply crafted coordinate values to cause a denial of service.

The direct Image.paste() path can copy attacker-controlled source pixel data into the out-of-bounds write, and the issue is reachable through documented public APIs without malformed image files.


How to mitigate CVE-2026-59199

Install security update from vendor's website.

Sources