Pillow before 13.0.0: saving an uploaded image as TIFF can leak server memory, update now
Python developers whose apps take uploaded images and save or convert them to compressed TIFF with Pillow, such as scan, print or archive pipelines.
How to fix it
You haveUpdate to
>= 2.3.0, < 13.0.0→13.0.0
Check your version
Which version you havepip show pillow
Update
pippip install --upgrade "pillow>=13.0.0"
uv add "pillow>=13.0.0"
Only saving is at risk, and only as a compressed TIFF, which goes through libtiff. A crafted upload can make the save copy chunks of your server's memory into the output file, crash the worker, or corrupt memory. The fix shipped in 13.0.0 before the flaw was made public, so if you updated for last month's FlashPix flaw, you're covered.