FITS GZIP decompression bomb in Pillow
Description
Published to the GitHub Advisory Database
Apr 13, 2026
Reviewed
Apr 13, 2026
Published by the National Vulnerability Database
Apr 15, 2026
Last updated
Apr 16, 2026
Impact
Pillow did not limit the amount of GZIP-compressed data read when decoding a FITS image, making it vulnerable to decompression bomb attacks. A specially crafted FITS file could cause unbounded memory consumption, leading to denial of service (OOM crash or severe performance degradation).
Patches
The amount of data read is now limited to the necessary amount.
Fixed in Pillow 12.2.0 (PR #9521).
Workarounds
Avoid Pillow >= 10.3.0, < 12.2.0
Only open specific image formats, excluding FITS.
References