Advisory

GHSA-whj4-6x5x-4v2j

Also known as: BIT-pillow-2026-40192, CVE-2026-40192, PYSEC-2026-2250

Summary

FITS GZIP decompression bomb in Pillow

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-04-13 19:22 UTC
Modified
2026-09-10 03:51 UTC

Affected packages and fixes

pillow

PyPI · All systems

Affected

  • introduced 10.3.0, fixed 12.2.0 (ecosystem)

Fixed versions

12.2.0

Fix

  • Fixed version 12.2.0
    pip install --upgrade pillow==12.2.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences