CVE-2026-59198 Pillow TGA RLE encoder can serialize up to ~57 KB of adjacent heap data into generated images
An attacker can craft a specific image to cause Pillow to leak adjacent heap memory into the output file, potentially exposing sensitive data.
- 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-59198?
CVE-2026-59198 is a medium-severity 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 5.2.0 until 12.3.0, Pillow's TGA RLE encoder reads past its packed row buffer when saving a mode 1 image with TGA RLE compression, allowing adjacent process heap bytes to be copied into the generated TGA file. This issue is fixed in version 12.3.0.
Weakness: CWE-125
Which versions are affected by CVE-2026-59198?
4 open source packages ship an affected version, including pillow and Pillow. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pillow Bitnami | From 5.2.0 | 12.3.0 |
pillow PyPI | From 5.2.0 | 12.3.0 |
pillow PyPI | From 5.2.0 | 12.3.0 |
Pillow PyPI | From 5.2.0 | 12.3.0 |
Products include Python Pillow.
How do I fix CVE-2026-59198?
Upgrade pillow to 12.3.0 or later.
Is CVE-2026-59198 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59198 exists.
Other vulnerabilities in Python Pillow
Sources
Also known as BIT-pillow-2026-59198, DEBIAN-CVE-2026-59198, ECHO-14ce-d866-ae2b, GHSA-fj7v-r99m-22gq, MINI-3886-fgr3-33h8, MINI-4v87-ppqg-8f77 and 13 more.