CVE-2026-112393 Pillow: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO
Heap buffer overflow in Pillow allows attackers to execute code or disclose memory when saving TIFF images to BytesIO targets.
- 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-112393?
CVE-2026-112393 is a critical memory corruption vulnerability in Python Pillow, published on 19 Oct 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 2.0.0 until 13.0.0, Pillow has a heap buffer overflow and stale-heap disclosure in _tiffWriteProc when saving compressed TIFF data through libtiff to a target without a usable fileno(), such as BytesIO. The callback sizes its allocation from the prior buffer size instead of the current write position, allowing an attacker-controlled out-of-line TIFF tag or retained ICC profile to be copied beyond the allocation after libtiff seeks forward. This overflow can crash the process and may allow code execution. Independently, unwritten alignment gaps in compressed TIFF output larger than 64 KiB can disclose stale heap bytes without a crafted tag. File paths and targets with real file descriptors are unaffected. This issue is fixed in version 13.0.0.
Weakness: CWE-122
Which versions are affected by CVE-2026-112393?
3 open source packages ship an affected version, including pillow and Pillow. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pillow Bitnami | From 2.0.0 | 13.0.0 |
pillow PyPI | From 2.0.0 | 13.0.0 |
Pillow PyPI | From 2.0.0 | 13.0.0 |
Products include Python Pillow.
How do I fix CVE-2026-112393?
Upgrade pillow to 13.0.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-112393 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-112393 exists.
Other vulnerabilities in Python Pillow
Sources
Also known as BIT-pillow-2026-112393, DEBIAN-CVE-2026-112393, ECHO-f908-0ef4-c858, GHSA-332p-7hrc-92wf, ROOT-APP-PYPI-CVE-2026-112393, UBUNTU-CVE-2026-112393.