CVE-2026-59199 Pillow: Heap out-of-bounds write `Image.paste()` / `Image.crop()` via signed coordinate overflow

High 7.5 Published Updated

Attackers can trigger heap out-of-bounds writes in Pillow via crafted image coordinates, potentially leading to code execution or crashes.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-59199?

CVE-2026-59199 is a high-severity memory corruption vulnerability in Python Pillow, published on 14 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Pillow is a Python imaging library. Prior to 12.3.0, Pillow public image coordinate APIs can trigger a native heap out-of-bounds write when given coordinates near the signed 32-bit integer limits in Image.paste(), Image.crop(), or Image.alpha_composite(). This issue is fixed in version 12.3.0.

Weakness: CWE-787, CWE-190

Which versions are affected by CVE-2026-59199?

4 open source packages ship an affected version, including pillow and Pillow. It affects 1 product.

PackageAffectedFixed in
pillow BitnamiAll versions12.3.0
pillow PyPIAll versions12.3.0
pillow PyPIAll versions12.3.0
Pillow PyPIAll versions12.3.0

Products include Python Pillow.

How do I fix CVE-2026-59199?

Upgrade pillow to 12.3.0 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-59199 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59199 exists.

All Python Pillow vulnerabilities

Sources

Also known as BIT-pillow-2026-59199, CLSA-2026-1787039243, DEBIAN-CVE-2026-59199, ECHO-eed4-3da2-904f, GHSA-6r8x-57c9-28j4, MINI-3qrh-gjmh-g9xc and 13 more.

Is CVE-2026-59199 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free