CVE-2026-59204 Pillow JPEG2000 tiled decode retains a growing scratch buffer and can be used for denial of service
A crafted tiled JPEG2000 image can cause excessive memory usage in Pillow, leading to out-of-memory failures and denial of service.
- 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-59204?
CVE-2026-59204 is a high-severity denial of service 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. From 8.2.0 through 12.2.0, src/libImaging/Jpeg2KDecode.c accumulates total_component_width across every tile in a JPEG2000 image instead of recomputing it per tile, allowing a crafted tiled JPEG2000 file to force substantially higher transient memory usage and trigger out-of-memory failures during decoding. This issue is fixed in version 12.3.0.
Which versions are affected by CVE-2026-59204?
4 open source packages ship an affected version, including pillow. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pillow Bitnami | From 8.2.0 | 12.3.0 |
pillow PyPI | From 8.2.0 | 12.3.0 |
pillow PyPI | From 8.2.0 | 12.3.0 |
pillow PyPI | From 8.2.0 | 12.3.0 |
Products include Python Pillow.
How do I fix CVE-2026-59204?
Upgrade pillow to 12.3.0 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-59204 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59204 exists.
Other vulnerabilities in Python Pillow
Sources
Also known as BIT-pillow-2026-59204, DEBIAN-CVE-2026-59204, ECHO-4d81-9643-d9a5, GHSA-vjc4-5qp5-m44j, MINI-2347-8m6w-7q5f, MINI-23j6-fxv5-vq76 and 12 more.