CVE-2026-59205 Pillow: Controlled heap out-of-bounds write in `ImageCmsTransform.apply()` via output mode mismatch
Attackers can trigger heap corruption in Pillow via mismatched image modes, 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-59205?
CVE-2026-59205 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's ImageCms.ImageCmsTransform.apply(im, imOut) API can trigger controlled native heap corruption when the caller supplies an output image whose mode does not match the transform's declared output mode. This issue is fixed in version 12.3.0.
Weakness: CWE-787
Which versions are affected by CVE-2026-59205?
4 open source packages ship an affected version, including pillow. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pillow Bitnami | All versions | 12.3.0 |
pillow PyPI | All versions | 12.3.0 |
pillow PyPI | All versions | 12.3.0 |
pillow PyPI | All versions | 12.3.0 |
Products include Python Pillow.
How do I fix CVE-2026-59205?
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-59205 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59205 exists.
Other vulnerabilities in Python Pillow
Sources
Also known as BIT-pillow-2026-59205, DEBIAN-CVE-2026-59205, ECHO-dd51-3327-b7ce, GHSA-9hw9-ch79-4vh6, MINI-2x3j-5qpj-r6rq, MINI-3vjv-6873-wprc and 12 more.