12.2.0 (2026-04-01)
Security
CVE 2026-40192: Prevent FITS decompression bomb
When decompressing GZIP data from a FITS image, Pillow did not limit the amount of data being read, meaning that it was vulnerable to GZIP decompression bombs. This was introduced in Pillow 10.3.0.
The data being read is now limited to only the necessary amount.
CVE 2026-42311: Fix OOB write with invalid tile extents
Pillow 12.1.1 addressed CVE 2026-25990 by improving checks for tile extents to prevent an OOB write from specially crafted PSD images in Pillow >= 10.3.0. However, these checks did not consider integer overflow. This has been corrected.