NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐍 PyPI
Not in CISA KEV

CVE-2026-40192 — pillow

Fix: python-pillow/Pillow@3cb854e

CVE-2026-40192 is a Uncontrolled Resource Consumption vulnerability in pillow. A fix is available for pillow — see the affected versions and patch details below.

Pillow is vulnerable to a FITS GZIP decompression bomb

Also known asBIT-pillow-2026-40192GHSA-whj4-6x5x-4v2jPYSEC-2026-2250
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 6, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-40192.

EPSS Exploitation Probability

via FIRST.org ↗
0.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs52th percentile — riskier than 52% of all scored CVEsHighest risk
0.00%0.46%0.91%1.37%0.0%0.7%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🐍pillow

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIpillow≥ 10.3.0&&< 12.2.012.2.0pip install --upgrade 'pillow==12.2.0'

Affected Products

1 product · 1 configurations
Application
pillowpython
≥ 10.3.0 && < 12.2.0
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for pillow, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update pillow to 12.2.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-40192 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant
Workaround published by Red Hat
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
Source: Red Hat security advisory for CVE-2026-40192 (CC BY 4.0)
ProductFixed inAdvisory
Red Hat Ansible Automation Platform 2.5 for RHEL 8python3.12-pillow-0:12.2.0-1.el8apRHSA-2026:24761
Red Hat Ansible Automation Platform 2.6 for RHEL 9python3.12-pillow-0:12.2.0-1.el9apRHSA-2026:24762
Red Hat Satellite 6.16 for RHEL 8python-pillow-0:12.2.0-1.el8pcRHSA-2026:27076
Red Hat Satellite 6.17 for RHEL 9python-pillow-0:12.2.0-1.el9pcRHSA-2026:34366
Red Hat Satellite 6.18 for RHEL 9python3.12-pillow-0:12.2.0-1.el9pcRHSA-2026:34368
Red Hat Satellite 6.19 for RHEL 9python3.12-pillow-0:12.2.0-1.el9pcRHSA-2026:34365
Red Hat AI Inference Server 3.2rhaiis/vllm-cuda-rhel9:1787860580RHSA-2026:61627
Red Hat AI Inference Server 3.2rhaiis/model-opt-cuda-rhel9:1787772157RHSA-2026:61628

Frequently Asked Questions

### 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](https://pillow.readthedocs.io/en/stable/releasenotes/8.0.0.html#image-open-add-formats-parameter), excl
O3 Security · Impact-Aware SCA

Is CVE-2026-40192 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2026-40192: pillow DoS — Fixed in 12.2.0