Pillow: Four Denial-of-Service Vulnerabilities Disclosed Together for Python Imaging Library
Key findings • Four memory exhaustion and infinite loop vulnerabilities disclosed for Python's Pillow imaging library. • Vulnerabilities affect EPS, PDF, and JPEG2000 parsing, with heap corru…

Key findings
- Four memory exhaustion and infinite loop vulnerabilities disclosed for Python's Pillow imaging library.
- Vulnerabilities affect EPS, PDF, and JPEG2000 parsing, with heap corruption also present.
- Exploitation can lead to denial-of-service conditions via memory exhaustion or infinite loops.
- All issues are fixed in Pillow version 12.3.0; users should update immediately.
On July 16, 2026, a batch of four vulnerabilities was disclosed for the Python Pillow imaging library. These vulnerabilities, reported by the Debian security team, affect various versions of Pillow and could lead to denial-of-service conditions through memory exhaustion or infinite loops. The issues stem from improper handling of specific image formats and data streams.
One vulnerability, CVE-2026-59205, identified in the ImageCms.ImageCmsTransform.apply() API, can lead to controlled native heap corruption. This occurs when an output image with a mode that does not match the transform's declared output mode is supplied by the caller.
Another vulnerability, CVE-2026-59203, resides within the EPS parser in PIL/EpsImagePlugin.py. Versions 12.0.0 through 12.2.0 are affected by a flaw where a negative byte count in the %%BeginBinary directive can cause Image.open() to enter an infinite loop by repeatedly seeking backward to the same directive.
CVE-2026-59200 impacts the PdfParser.PdfStream.decode() function in PIL/PdfParser.py. From version 5.1.0 up to 12.3.0, this function calls zlib.decompress() without bounding the decompressed output size. A crafted FlateDecode PDF stream can exploit this to exhaust system memory, even from a small file.
Finally, CVE-2026-59204, found in src/libImaging/Jpeg2KDecode.c, affects versions 8.2.0 through 12.2.0. This vulnerability involves the accumulation of total_component_width across every tile in a JPEG2000 image, rather than recomputing it per tile. A malicious JPEG2000 file can exploit this to cause excessive transient memory usage, leading to out-of-memory conditions.
All identified vulnerabilities are addressed in Pillow version 12.3.0. Users are strongly advised to update to this version to mitigate the risks associated with these memory exhaustion and infinite loop vulnerabilities. The timely disclosure and patching of these issues by the Debian security team help protect users from potential denial-of-service attacks targeting applications that utilize the Pillow library for image processing.