CVE-2026-40192 Pillow is vulnerable to a FITS GZIP decompression bomb

High 8.7 Published Updated

Attackers can cause denial of service via memory exhaustion by submitting crafted FITS images to applications using the Pillow library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-40192?

CVE-2026-40192 is a high-severity denial of service vulnerability in Python Pillow, published on 15 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Pillow is a Python imaging library. Versions 10.3.0 through 12.1.1 did not limit the amount of GZIP-compressed data read when decoding a FITS image, making them 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). If users are unable to immediately upgrade, they should only open specific image formats, excluding FITS, as a workaround.

Weakness: CWE-409, CWE-770, CWE-400

Which versions are affected by CVE-2026-40192?

4 open source packages ship an affected version, including pillow. It affects 1 product.

PackageAffectedFixed in
pillow BitnamiFrom 10.3.012.2.0
pillow PyPIFrom 10.3.012.2.0
pillow PyPIFrom 10.3.012.2.0
pillow PyPIFrom 10.3.012.2.0
Linux distribution packages (2)
python-Pillow openSUSE:Leap 16.0All versions11.3.0-160000.4.1
python-Pillow openSUSE:TumbleweedAll versions12.2.0-2.1

Products include Python Pillow.

How do I fix CVE-2026-40192?

Upgrade pillow to 12.2.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-40192 being exploited?

There is no known exploitation of CVE-2026-40192 in the wild and no public exploit code.

All Python Pillow vulnerabilities

Sources

Also known as BIT-pillow-2026-40192, CLEANSTART-2026-OR44215, CLEANSTART-2026-XY80928, CLSA-2026-1776904626, CLSA-2026-1778028238, CLSA-2026-1781744117 and 19 more.

Is CVE-2026-40192 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free