Skip to main content

Pillow CVE-2026-96637

| EUVDEUVD-2026-107569 HIGH
Uncontrolled Resource Consumption (CWE-400)
7.1
CVSS 4.0 · Vendor
View

Attack ChainAIDerived

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

  1. Access
    Deliver crafted multi-frame SPIDER file
  2. Delivery
    Image.open() passes bomb check on safe first frame
  3. Exploit
    Application seeks to oversized later mode-F frame
  4. Execution
    seek() reparses dimensions without rechecking
  5. Impact
    Allocate ~4 bytes/pixel, exhaust memory and crash

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption 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

Exploitation requires an application to open an attacker-supplied multi-frame SPIDER-format stack image and then advance past the first frame (SpiderImageFile.seek() to a later frame) and load it. The malicious file deliberately uses a small, safe first frame to pass Image._decompression_bomb_check() at Image.open() time, then declares very large dimensions in a later mode-F frame; prior to 13.0.0, seek() replaced self._size and reloaded without re-running the bomb check. Limiting factors: the application must specifically process SPIDER stack files (a niche electron-microscopy format rarely fed untrusted input), must iterate/seek beyond the first frame rather than only reading frame 0, and the impact is confined to memory-exhaustion DoS (UI:P / passive application interaction, no authentication, no code execution).

Impact

This is a CWE-400 uncontrolled resource consumption (memory exhaustion / decompression bomb) issue in Pillow's SPIDER image handling, scored CVSS 4.0 7.1 (High). The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H) is internally consistent with the description: network-deliverable malicious file, no privileges, passive user/application interaction, and an availability-only impact - there is NO confidentiality or integrity impact and NO code execution, so this is strictly a denial-of-service bug. No EPSS score was provided, the CVE is NOT in CISA KEV, and no standalone weaponized exploit is flagged in the input (the fix commit does include a test that crafts a triggering file, but that is a regression test, not an in-the-wild exploit). Taken together the signals point to a genuine-but-moderate DoS: the severity is real for services that ingest untrusted SPIDER stacks, but exploitation is bounded by the fact that the SPIDER format is a niche scientific-imaging format rarely exposed to untrusted input, and the worst realistic outcome is memory exhaustion rather than compromise. Treat as a patch-in-normal-cycle availability hardening item, not an emergency - prioritize only where applications accept attacker-controlled multi-frame SPIDER files.

Exploit ScenarioDerived

An attacker submits a tiny multi-frame SPIDER image whose first frame declares safe dimensions so Image.open() passes the decompression-bomb check, while a later mode-F frame declares enormous dimensions (e.g., 65535x65535). When the application advances to that frame via seek() and loads it, Pillow allocates roughly four bytes per attacker-declared pixel - multiple gigabytes - exhausting memory and crashing the process. No public in-the-wild exploit is identified, though the fixing commit includes a proof-of-concept test demonstrating the crafting technique.

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

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

Alert me

AnalysisAIv2 – Oct 21, 2026

Memory exhaustion in Pillow's SPIDER image plugin lets an attacker-supplied multi-frame .spider stack file bypass the library's decompression-bomb guard and drive allocations of several gigabytes. The flaw lives in SpiderImageFile.seek(), which reparses a later frame and overwrites self._size without re-running Image._decompression_bomb_check(), so a tiny file with a benign first frame passes Image.open() and then declares enormous dimensions in a later mode-F frame; loading that frame consumes roughly four bytes per attacker-declared pixel. All Pillow releases prior to 13.0.0 that parse SPIDER stacks are affected, and exploitation requires the application to open an untrusted multi-frame SPIDER file and then seek past frame 0 - a niche, passive-interaction path consistent with the assessed CVSS 3.1 vector AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H. No public exploit code or confirmed active exploitation was identified at time of analysis, and the vendor patch is 13.0.0.

Earlier versions of this analysis (1)
v1 Oct 21, 2026 - 20:18

Memory exhaustion in Pillow's SPIDER image handling allows unauthenticated remote attackers to bypass the library's decompression-bomb limit by opening a crafted multi-image SPIDER stack and advancing frames with seek(), causing an oversized allocation. Pillow releases before 13.0.0 are affected; the issue is fixed in Pillow 13.0.0. No CISA KEV status, EPSS score, or public exploit code was supplied at time of analysis, and the assessed impact is availability-only (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

RemediationAI

Vendor-released patch: Pillow 13.0.0. Upgrade with pip install --upgrade 'Pillow>=13.0.0' and confirm the resolved version, since distro and container base images frequently pin older releases; the fix is the added Image._decompression_bomb_check(self.size) call in SpiderImageFile.seek() (commit 7cb0e02389d8aac2a60896a490f572db0b07b841, PR #10076), documented in the 13.0.0 release notes and GHSA-g842-9rc4-69pw. If upgrade cannot be performed immediately, the effective compensating control is to keep the bomb guard authoritative for every frame: set Image.MAX_IMAGE_PIXELS to a value appropriate for your workload and treat Image.DecompressionBombWarning as an error, but note that pre-13.0.0 seek() does not consult the guard at all, so this alone does not close the path - it must be paired with application-level rejection of SPIDER stacks whose header-declared frame dimensions exceed a sane maximum before calling im.seek(). Alternatively, disable or blocklist the SPIDER plugin for untrusted input (for example by refusing .spider/.spi uploads or by restricting Image.open() to an explicit allowlist of formats); the trade-off is loss of legitimate electron-microscopy processing. Running image decoding in a memory-capped worker or subprocess (cgroup or rlimit memory limits with a hard kill) bounds the blast radius to a failed job instead of host-wide memory pressure, at the cost of added latency and per-job resource isolation overhead. Finally, avoid iterating frames of untrusted multi-frame files more than necessary, since the exhaustion only triggers on seek() past frame 0; no public exploit code or confirmed active exploitation was identified at time of analysis, so prioritization should follow normal risk-based patching rather than emergency response.

Affected VersionsENISA

Pillow < 13.0.0

Affected Packages

euvd pillow fix: 13.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

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

Technical ContextAI · show details

Pillow's SPIDER plugin (src/PIL/SpiderImagePlugin.py) reads SPIDER-format image stacks used in electron microscopy: a fixed-size header of little-endian 32-bit floats containing fields such as istack (stack flag), the frame count, and per-frame width/height, followed by raw pixel data. The library guards against decompression bombs by comparing reported dimensions against Image.MAX_IMAGE_PIXELS inside Image._decompression_bomb_check(), which is invoked during Image.open(). CWE-400 (uncontrolled resource consumption) arises because seek() re-parses the header of a later frame and assigns the new dimensions directly to self._size, then triggers loading through the normal tile path, without any repeat of the bomb check. The validation performed at open() time therefore only covers frame 0, and the security property it establishes is not preserved across frame transitions. Because mode-F frames are 32-bit float data, a frame advertising dimensions near 65535x65535 yields roughly four bytes per declared pixel, i.e., multiple gigabytes of allocation from a file that is only a few kilobytes on disk. The upstream fix (commit 7cb0e02389d8aac2a60896a490f572db0b07b841, PR #10076) adds a single Image._decompression_bomb_check(self.size) call inside seek() after the re-parse, and the accompanying regression test constructs a two-frame file - a small valid first frame plus a 65535x65535 second frame - and asserts that seek(1) now raises Image.DecompressionBombError.

Know when Pillow gets its next vulnerability

  • 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 (CNA) PRIMARY 7.1 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 6.5 MEDIUM

Malicious file is network-deliverable with no privileges (PR:N), but the app must seek to and load a later frame (UI:R); impact is availability-only memory exhaustion (A:H), no C/I impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (CNA).

CVSS VectorVendor

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
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
Patch available
Oct 21, 2026 - 22:03 EUVD
Analysis Updated
Oct 21, 2026 - 21:32 vuln.today
v2 - CVSS changed
CVSS changed
Oct 21, 2026 - 21:23 NVD
7.1 (HIGH)
CVE Published
Oct 21, 2026 - 19:14 oss-security
HIGH

Description PRE-NVD

Disclosed via oss-security. NVD scoring and full description are pending.

Technical POC Analysis

Evidence basis note: this analysis is grounded in GHSA-g842-9rc4-69pw (advisory, line references, reproduction description, suggested fix).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Pillow, the Python imaging library used across many internal image-processing, upload, and thumbnail pipelines, contains a memory-exhaustion flaw that lets a crafted multi-frame SPIDER stack file trigger multi-gigabyte allocations after the initial decompression-bomb check is passed. Any team operating services that open user-supplied or third-party image files is exposed; the realistic outcome is worker or container crashes and processing outages rather than data loss or code execution. Leadership should care because a single small malicious file can degrade or take down shared image-processing capacity, and the fix requires a library version bump that must be tracked to completion across many application owners.

Business Impact: Medium
Compensating Controls

Vendor-released patch: 13.0.0. Until every deployment is upgraded, reject .spider and other non-required multi-frame formats at the upload/file-validation layer, disable or remove the SPIDER plugin where it is not operationally needed, cap worker memory and enforce request timeouts so a single allocation spike is contained to one process, and alert on OOM kills in image-processing services.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
High
extremely popular Python imaging library, though SPIDER stack handling is rarely exposed
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

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 No
EPSS 0.3%
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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
Medium

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
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.

More in Pillow

View all
CVE-2022-30595 CRITICAL POC
9.8 May 25

libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files. Rated

CVE-2026-59204 HIGH POC
8.7 Jul 14

Denial of service in Python Pillow (versions 8.2.0 through 12.2.0) allows remote attackers to exhaust memory during JPEG

CVE-2026-54058 HIGH POC
8.3 Jul 14

Out-of-bounds memory disclosure in Python Pillow before 12.3.0 lets an attacker who supplies a crafted McIdas AREA image

CVE-2026-59197 HIGH POC
8.2 Jul 14

Heap out-of-bounds write in Python Pillow prior to 12.3.0 lets an attacker who controls the rank-filter size parameter c

CVE-2026-59200 HIGH POC
7.5 Jul 14

Uncontrolled memory consumption in Python Pillow (PIL) versions 5.1.0 through 12.2.x allows a remote attacker to cause d

CVE-2021-23437 HIGH POC
7.5 Sep 03

The package pillow 5.2.0 and before 8.3.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the getrgb

CVE-2025-48379 HIGH POC
7.1 Jul 01

Pillow is a Python imaging library. In versions 11.2.0 to before 11.3.0, there is a heap buffer overflow when writing a

CVE-2016-4009 CRITICAL
9.8 Apr 13

Integer overflow in the ImagingResampleHorizontal function in libImaging/Resample.c in Pillow before 3.1.1 allows remote

CVE-2014-3007 CRITICAL
10.0 Apr 27

Python Image Library (PIL) 1.1.7 and earlier and Pillow 2.3 might allow remote attackers to execute arbitrary commands v

CVE-2026-96639 CRITICAL
9.8 Oct 21

Pillow versions 11.0.0 through 12.x (fixed in 13.0.0) can reuse a stale native ImagingCore buffer when a multi-frame ima

CVE-2021-34552 CRITICAL
9.8 Jul 13

Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters

CVE-2021-25289 CRITICAL
9.8 Mar 19

An issue was discovered in Pillow before 8.1.1. Rated critical severity (CVSS 9.8), this vulnerability is remotely explo

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