Cloudanix VulnDB

CVE-2026-96637

Medium · 6.5

CVSS

6.5

EPSS

0.4%

Published

Oct 21, 2026

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A popular Python library for reading images can be tricked by a specially crafted file into using up enormous amounts of memory, which may slow down or crash programs that handle pictures.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Bypass of Image._decompression_bomb_check() in SpiderImageFile.seek() allows a later SPIDER frame to overwrite self._size with attacker-controlled dimensions, triggering allocation of ~4 bytes per declared pixel and resulting in multi-GB memory consumption from a small input file.

Why it matters to the business

Applications that process untrusted images can experience sudden high memory usage leading to process crashes, service denial, or forced restarts; the issue is only four days old with stable low exploit probability and no known ransomware usage, limiting immediate widespread operational risk but still requiring prompt patching of any Pillow-dependent image pipelines.

How an attack unfolds

An attacker creates a minimal SPIDER file whose first frame passes the initial size check, then includes a later mode-F frame declaring massive dimensions; when the target application calls seek() on that frame, the library allocates gigabytes without re-checking, exhausting memory on the host process.

How to fix it

Upgrade Pillow to version 13.0.0 or later; verify the installed package reports the fixed version before restarting any services that load external images.

How to confirm the fix worked

Confirm the running Pillow version is 13.0.0+, then attempt to open a test SPIDER file containing an oversized later frame and verify the decompression-bomb exception is raised before large allocation occurs.

Typical attack path

  1. Craft a small SPIDER image containing a safe first frame followed by a mode-F frame with huge declared dimensions
  2. Deliver the file to a target application via upload, URL fetch, or email attachment
  3. Trigger Image.open() followed by seek() or iteration that loads the malicious frame
  4. Observe process memory growth until exhaustion or OOM termination

How to detect it

Monitor Python processes that use PIL/Pillow for sudden spikes in resident memory when handling SPIDER files; inspect application logs for traceback entries referencing SpiderImagePlugin.py or seek() on image objects; correlate with inbound image uploads or fetches that precede the memory event.

What your security team should do

  • Immediately inventory all Python environments for Pillow versions prior to 13.0.0
  • Prioritize upgrade of any services that accept user-supplied images
  • Add memory-usage monitoring and alerting around image-processing workers
  • Re-test image-handling code paths after the upgrade

The record

Pillow is a Python imaging library. Prior to 13.0.0, SpiderImageFile.seek() in src/PIL/SpiderImagePlugin.py reparses a later SPIDER stack frame and replaces self._size without rerunning Image._decompression_bomb_check(). A tiny file can use a safe first frame to pass Image.open() and then declare very large dimensions in a later mode F frame. Loading that frame allocates approximately four bytes per attacker-declared pixel and can consume multiple gigabytes of memory. This issue is fixed in version 13.0.0.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities