Skip to main content

CVE-2026-40192

HIGH
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-04-13 https://github.com/python-pillow/Pillow GHSA-whj4-6x5x-4v2j
8.7
CVSS 4.0 · Vendor: https://github.com/python-pillow/Pillow
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Upload crafted FITS file →

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The target system must use Pillow versions 10.3.0 through 12.1.x AND process FITS image files from untrusted sources. FITS format support is not enabled by default restriction (Pillow auto-detects formats), so the vulnerability applies to any deployment accepting arbitrary image uploads unless the application explicitly restricts allowed formats via the Image.open(formats=...) parameter. The attack does not require specific server configurations, authentication, or user interaction beyond uploading the malicious file. Applications that exclusively handle common web formats (JPEG, PNG, GIF) via format whitelisting are not exposed, even if running vulnerable Pillow versions. Scientific computing environments and astronomy data processing pipelines using FITS legitimately represent the highest-risk deployment scenario.

Impact

Real-world risk is moderate despite the trivial exploitation path. The vulnerability requires no authentication and exploits via simple file upload (likely AV:N/AC:L/PR:N based on description), but impact is limited to availability (DoS) rather than code execution. CISA KEV status is absent, indicating no confirmed active exploitation campaigns. No EPSS data provided, but decompression bombs are well-understood attack primitives with numerous public examples across libraries. The key risk mitigator is deployment context: applications that accept arbitrary image uploads from untrusted users (web apps, CDN ingestion pipelines, ML training systems) face immediate exposure, while internal-only image processing workflows have minimal risk. The 21-month exposure window (10.3.0 release to 12.2.0 fix) and Pillow's ubiquity in Python ecosystems (data science, web frameworks, automation tools) create significant vulnerable surface area. However, FITS is a specialized format rarely encountered outside scientific computing, drastically reducing practical attack surface compared to vulnerabilities in JPEG/PNG parsers. SSVC decision tree: exploitation is Proof-of-Concept (decompression bombs are trivial to construct), automatable (yes, via file upload), technical impact is partial (DoS only). This places remediation at 'Scheduled' priority for most organizations unless FITS processing is a known feature.

Exploit ScenarioDerived

An attacker crafts a FITS file with a small GZIP-compressed payload (few kilobytes) that decompresses to gigabytes of data, then submits it to a web application's image upload endpoint powered by Pillow. When the application attempts to process or validate the image using Pillow's Image.open(), the library reads and decompresses the entire payload into memory without limit checks. The server exhausts available RAM, triggering an out-of-memory crash that takes down the application process or degrades performance for all users. The attack requires no authentication if the upload endpoint is public, and the malicious file passes basic filetype validation since it's a structurally valid FITS file. Automated scanners could trivially generate and distribute such payloads.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 15, 2026

Unbounded GZIP decompression in Pillow's FITS image parser enables remote denial-of-service via crafted image files. Pillow versions 10.3.0 through 12.1.x process FITS images without limiting decompression output, allowing attackers to trigger out-of-memory crashes or severe performance degradation through maliciously compressed images. Vendor-released patch available in Pillow 12.2.0. No active exploitation confirmed (not in CISA KEV), but the attack vector is trivial for any application accept

Earlier versions of this analysis (1)
v1 Apr 15, 2026 - 12:34

Unbounded GZIP decompression in Pillow's FITS image parser enables remote denial-of-service via crafted image files. Pillow versions 10.3.0 through 12.1.x process FITS images without limiting decompression output, allowing attackers to trigger out-of-memory crashes or severe performance degradation through maliciously compressed images. Vendor-released patch available in Pillow 12.2.0. No active exploitation confirmed (not in CISA KEV), but the attack vector is trivial for any application accepting user-supplied images.

RemediationAI

Upgrade Pillow to version 12.2.0 or later immediately using pip install --upgrade pillow==12.2.0 or equivalent package manager commands. The fix (PR #9521, commit 3cb854e8b2bab43f40e342e665f9340d861aa628) enforces decompression output limits proportional to image metadata. For environments unable to upgrade immediately, implement one of two workarounds: (1) Pin Pillow to version 10.2.0 or earlier (pre-regression), though this forgoes 21 months of other security fixes, or (2) configure Pillow's Image.open() with the formats parameter to explicitly exclude FITS, as documented at https://pillow.readthedocs.io/en/stable/releasenotes/8.0.0.html#image-open-add-formats-parameter (example: Image.open(file, formats=['PNG', 'JPEG'])). For containerized deployments, rebuild base images with updated Pillow. Verify patch effectiveness by testing with known decompression bomb samples. Release notes: https://pillow.readthedocs.io/en/stable/releasenotes/12.2.0.html#prevent-fits-decompression-bomb.

Affected Packages

pypi pillow fix: 12.2.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Pillow is Python's de facto image processing library (pkg:pip/pillow), supporting over 30 file formats including FITS (Flexible Image Transport System), an astronomy data format with GZIP compression support. The vulnerability stems from CWE-770 (Allocation of Resources Without Limits or Throttling) in the FITS decoder introduced in version 10.3.0. When parsing FITS files, the library decompresses embedded GZIP streams without size validation, creating a classic decompression bomb scenario where attackers embed minimal compressed data that expands to gigabytes in memory. Unlike image dimension-based bombs (which Pillow guards against), this exploits the decompression layer before image data is validated. The fix (PR #9521, commit 3cb854e) enforces decompression output limits proportional to declared FITS image dimensions, mirroring protections already present for other compressed formats like PNG.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/python-pillow/Pillow) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/python-pillow/Pillow).

CVSS VectorVendor: https://github.com/python-pillow/Pillow

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
PoC Detected
Apr 22, 2026 - 20:08 vuln.today
Public exploit code
CVSS changed
Apr 15, 2026 - 23:22 NVD
8.7 (HIGH)
Patch released
Apr 13, 2026 - 19:30 nvd
Patch available
CVE Published
Apr 13, 2026 - 19:22 nvd
HIGH 8.7

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Pillow image processing library versions 10.3.0 through 12.1.x contain an unbounded GZIP decompression vulnerability in FITS image parsing that allows remote attackers to trigger denial-of-service through specially crafted image files. Any application accepting user-supplied images-including web platforms, content management systems, and image processing services-faces risk of service outages or performance collapse. Immediate patching is critical for organizations processing untrusted image uploads.

Business Impact: High
Compensating Controls

Apply vendor patch (Pillow 12.2.0 or later). If immediate patching is not feasible, implement request-level decompression limits (maximum output size thresholds) and disable FITS image processing functionality until patched. Monitor application logs for memory exhaustion errors or timeout patterns consistent with decompression attacks.

Threat Intelligence Overview

EPSS Score
0.0%
Top 87% exploitable
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

64
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

pkg:pip/pillow

Vendor StatusVendor

SUSE

Severity: High
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP7 Fixed
SUSE Linux Enterprise Module for Python 3 15 SP7 Fixed
SUSE Linux Enterprise Server 15 SP7 Fixed

References

Advisories & patches
PATCH https://github.com/python-pillow/Pillow/commit/3cb854e8b2bab43f40e342e665f9340d861aa628 PATCH https://github.com/python-pillow/Pillow/pull/9521 ADVISORY https://github.com/python-pillow/Pillow/security/advisories/GHSA-whj4-6x5x-4v2j ADVISORY https://vuldb.com/vuln/357827 REF https://access.redhat.com/errata/RHSA-2026:16008 REF https://access.redhat.com/errata/RHSA-2026:16009 REF https://access.redhat.com/errata/RHSA-2026:16030 REF https://access.redhat.com/errata/RHSA-2026:16174 REF https://access.redhat.com/errata/RHSA-2026:17609 REF https://access.redhat.com/errata/RHSA-2026:17611 REF https://access.redhat.com/errata/RHSA-2026:19375 REF https://access.redhat.com/errata/RHSA-2026:19712 REF https://access.redhat.com/errata/RHSA-2026:21017 REF https://access.redhat.com/errata/RHSA-2026:22465 REF https://access.redhat.com/errata/RHSA-2026:22629 REF https://access.redhat.com/errata/RHSA-2026:22840 REF https://access.redhat.com/errata/RHSA-2026:23361 REF https://access.redhat.com/errata/RHSA-2026:24761 REF https://access.redhat.com/errata/RHSA-2026:24762 REF https://access.redhat.com/errata/RHSA-2026:24853 REF https://access.redhat.com/errata/RHSA-2026:24866 REF https://access.redhat.com/errata/RHSA-2026:24977 REF https://access.redhat.com/errata/RHSA-2026:27076 REF https://access.redhat.com/errata/RHSA-2026:34365 REF https://access.redhat.com/errata/RHSA-2026:34366 REF https://access.redhat.com/errata/RHSA-2026:34368 REF https://access.redhat.com/errata/RHSA-2026:37275 REF https://access.redhat.com/errata/RHSA-2026:57387 REF https://access.redhat.com/errata/RHSA-2026:61627 REF https://access.redhat.com/errata/RHSA-2026:61628 REF https://access.redhat.com/errata/RHSA-2026:61629 REF https://access.redhat.com/errata/RHSA-2026:65126 REF https://access.redhat.com/security/cve/CVE-2026-40192 REF https://bugzilla.redhat.com/show_bug.cgi?id=2458856 REF https://github.com/advisories/GHSA-whj4-6x5x-4v2j REF https://pillow.readthedocs.io/en/stable/releasenotes/12.2.0.html#prevent-fits-decompression-bomb REF https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40192.json

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy