EXPOSURES › CVE-2026-112393
CVE-2026-112393
CRITICALPillow's heap buffer overflow in TIFF writing allows remote code execution via crafted tags or ICC profiles.
Pillow, a widely used Python imaging library, suffered a heap buffer overflow and stale-heap disclosure in its TIFF writing function from version 2.0.0 to 13.0.0. An attacker could exploit this by sending a malicious TIFF file with an out-of-line tag or retained ICC profile, causing the library to copy data beyond its allocation and execute arbitrary code. DIB organizations must ensure all Python imaging libraries are patched to version 13.0.0 or later to prevent exploitation, as this vulnerability could lead to system compromise and data breaches.
Shame score — A critical heap buffer overflow in a widely used library that enables remote code execution, indicating severe avoidable negligence in patching and vulnerability management.
▸ RECOMMENDED ACTION Remote code execution — patch the affected products on priority.
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.