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

Published Apr 13, 2026
·
Updated

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.

Other sources

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.

MITRE

Affected Software

3 affected componentsFixes available
pip/pillow>=10.3.0<12.2.0
12.2.0
Python Pillow>=10.3.0<12.2.0
IBM watsonx.data intelligence<=5.2.2, 5.3.0, 5.3.1, 5.3.1-patch-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/pillow to a version that resolves this vulnerability.

    Fixed in 12.2.0
  2. Upgrade

    Upgrade Pillow to a version that resolves this vulnerability.

    Fixed in 12.2.0Patch PR #9521
  3. Configuration

    If unable to upgrade, configure Pillow to open only specific image formats using the 'formats' parameter, excluding FITS.

    Pillow image-open (formats parameter) = Open only specific image formats and exclude FITS
  4. Configuration

    Do not run Pillow versions '>= 10.3.0, < 12.2.0' when decoding FITS, since they do not limit GZIP-compressed data read for FITS decoding (decompression bomb risk).

    Pillow Do not use vulnerable versions for FITS decoding = Avoid Pillow >= 10.3.0, < 12.2.0

Event History

Apr 13, 2026
Advisory Published
via GitHub·07:22 PM
Data Sourced
via GitHub·07:22 PM
DescriptionWeaknessAffected Software
Apr 15, 2026
CVE Published
via MITRE·10:53 PM
Data Sourced
via MITRE·10:53 PM
DescriptionWeakness
Data Sourced
via NVD·11:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 16, 2026
Data Sourced
via Red Hat·12:01 AM
DescriptionSeverityAffected Software
Jun 24, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-40192?

CVE-2026-40192 is categorized as a high severity vulnerability due to the risk of denial of service from memory exhaustion.

2

How do I fix CVE-2026-40192?

To fix CVE-2026-40192, upgrade Pillow to version 12.2.0 or later.

3

What types of attacks are possible with CVE-2026-40192?

CVE-2026-40192 allows for decompression bomb attacks that could consume excessive memory.

4

What versions of Pillow are affected by CVE-2026-40192?

Versions of Pillow from 10.3.0 up to but not including 12.2.0 are affected by CVE-2026-40192.

5

What is the primary impact of CVE-2026-40192?

The primary impact of CVE-2026-40192 is unbounded memory consumption leading to denial of service.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203