Skip to main content

Pillow EUVDEUVD-2026-104598

| CVE-2026-112390 HIGH
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-10-19 GitHub_M GHSA-22hg-r758-rrw9
8.2
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Upload crafted MIC file to image handler
  2. Delivery
    App calls n_frames/save-all with olefile present
  3. Exploit
    Non-advancing TIFF IFD traversal loops
  4. Execution
    Worker pinned at full CPU indefinitely
  5. Impact
    Service resource exhaustion / denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
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

Requires: (1) the optional olefile package installed alongside Pillow (not a default Pillow dependency); (2) Pillow version 7.2.0 up to but not including 13.0.0; (3) the application reading n_frames or saving all frames of an attacker-controlled MIC file; and (4) that MIC file embedding a TIFF with at least three IFDs so MicImageFile.tell/seek frame state never advances. Limiting factors: exploitation is impossible without olefile installed and without the app invoking the frame-count/save-all code path, so default Pillow installs that never touch MIC frames are not affected; impact is confined to CPU/availability exhaustion with no data exposure or code execution.

Impact

This is a denial-of-service issue (CWE-835, uncontrolled infinite loop) with no confidentiality or integrity impact - the provided CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H) scores 8.2 solely on high availability impact (VA:H), driving a CPU-pinning worker hang. The most important modifier is AT:P (Attack Requirements Present): exploitation is NOT universal because it requires the optional olefile package to be installed AND the application to invoke n_frames or save-all on an attacker-supplied MIC file. No EPSS score, KEV listing, or SSVC decision data was supplied, so exploitation-probability signals are absent; there is no public exploit identified (the only GitHub code artifact is the fix commit/test, not weaponized PoC). Signals are internally consistent - network-reachable but conditioned on a non-default dependency and a specific API call path - so this is a real availability concern for services that process untrusted images with olefile present, but it is materially lower priority than the 8.2 suggests for the majority of Pillow deployments that do not have olefile installed or do not read MIC frame counts. Note the input CVSS 4.0 AT:P correctly reflects the olefile/MIC precondition; a naive 3.1 reading as AV:N/AC:L/PR:N would overstate ease of attack.

Exploit ScenarioDerived

An attacker uploads a crafted MIC (OLE-wrapped) file containing an embedded TIFF with at least three IFDs to a Python web service that uses Pillow with olefile installed to inspect or re-save image frames. When the service calls n_frames or save-all on the file, TIFF frame traversal never advances and the worker process spins at 100% CPU indefinitely, degrading or denying service. No public exploit code is identified at time of analysis; the vector is network-reachable and low-complexity but gated by the olefile dependency and specific frame-handling call path.

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

AnalysisAIv1 – Oct 19, 2026

Pillow versions 7.2.0 through 12.x can hang indefinitely at full CPU when an application reads n_frames or saves all frames from a crafted MIC image; MicImageFile inherits TIFF frame traversal but its tell() reports the OLE stream index and its seek() resets TIFF frame state, so an embedded TIFF with at least three IFDs never advances the traversal. The attacker only needs to supply the MIC file, but exploitation requires the optional olefile package to be installed and the application to invoke the frame-count or save-all code path - default Pillow installs that never touch MIC frames are unaffected. Impact is confined to availability (CWE-835 uncontrolled loop, no confidentiality or integrity effect); vendor-released patch: 13.0.0.

RemediationAI

Upgrade Pillow to 13.0.0 or later - the fixed release is at https://github.com/python-pillow/Pillow/releases/tag/13.0.0 and the change is in commit 26cb3ed061173b817b9ee4b6f507cb0e1e293218, per advisory GHSA-22hg-r758-rrw9. This is the only complete fix; there is no configuration flag that repairs the non-advancing traversal. If an immediate upgrade is not possible, apply these compensating controls with their trade-offs: (1) run untrusted image processing in a subprocess or worker pool with a hard wall-clock timeout (e.g. multiprocessing join with timeout, or a task queue like Celery/RQ with time_limit), so a pinned worker is killed rather than stalling the service - this costs latency and requires careful cleanup of orphaned children; (2) reject MIC input at the application boundary (magic-byte/'MIC' signature or extension filtering before Pillow opens the file) unless MIC support is genuinely required, accepting loss of legitimate MIC processing; (3) if MIC support is needed, avoid calling n_frames and avoid save-all / ImageSequence iteration on MIC files, converting only a single requested frame instead - this narrows functionality and must be audited across code paths, since Image.save() with an append_images or animated path can trigger the traversal; (4) uninstall olefile where MIC/OLE handling is not needed, which removes the vulnerable code path entirely but breaks any other olefile-dependent feature. Note that the CVSS 4.0 input score of 8.2 reflects AV:N/AC:L/AT:P with high availability impact; the authoritative assessment rates it CVSS 3.1 AV:N/AC:H/PR:N/UI:N with A:H only, consistent with the mitigating prerequisites above.

Affected VersionsENISA

Pillow 7.2.0, < 13.0.0

Affected Packages

pypi pillow fix: 13.0.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's MIC (Microsoft Image Composer) plugin, MicImageFile, subclasses the TIFF plugin and reuses its multi-frame traversal logic while storing its payload inside an OLE compound document via olefile. The two frame models conflict: MicImageFile.tell() returns the OLE stream index rather than the TIFF frame number, and MicImageFile.seek() resets the inherited TIFF frame state, so the internal frame pointer used by TiffImagePlugin._seek() never advances past the first position. When an embedded TIFF contains at least three IFDs, the 'next frame' pointer keeps resolving to a previously seen location and the loop in the frame-count logic re-iterates forever, pinning a worker thread at 100% CPU. The root cause class is CWE-835 (Loop with Unreachable Exit Condition / infinite loop). The upstream fix (commit 26cb3ed) moves the _n_frames cache initialization into TiffImagePlugin.__init__, guards the traversal with '_n_frames is None' and replaces a frame-position-length check with a hasattr(self, 'is_animated') check, adding regression tests asserting that n_frames and is_animated cannot be changed once set - i.e. the cached frame count short-circuits the non-advancing traversal. Per the authoritative assessment, the realistic attack vector is remote but complex (CVSS 3.1 AV:N/AC:H/PR:N/UI:N/A:H), requiring olefile, the vulnerable version range, an attacker-controlled MIC file embedding a TIFF with three or more IFDs, and an application code path that calls n_frames or save-all - with no path to data disclosure or code execution.

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

AC:H because exploitation depends on the non-default olefile package and a specific MIC-frame API path; PR:N/UI:N as untrusted input is processed automatically; only availability (A:H) is affected.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
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

2
Patch available
Oct 19, 2026 - 22:03 EUVD
CVE Published
Oct 19, 2026 - 20:35 cve.org
HIGH 8.2

DescriptionCVE.org

Pillow is a Python imaging library. From 7.2.0 until 13.0.0, Pillow can enter an infinite loop while determining the frame count of a MIC image. MicImageFile inherits TIFF frame traversal, but MicImageFile.tell reports the OLE stream index and its seek() resets TIFF frame state, so an embedded TIFF with at least three IFDs never advances. When an application with olefile installed reads n_frames or saves all frames from a crafted MIC file, the non-advancing traversal can hold a worker at full CPU indefinitely. This issue is fixed in version 13.0.0.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 273 pypi packages depend on pillow (227 direct, 46 indirect)

Ecosystem-wide dependent count for version 7.2.0.

Technical POC Analysis

CWE-835 (Loop with Unreachable Exit Condition).

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, a widely used image-processing library, has a high-severity availability flaw that can cause applications to hang at full CPU when processing specially crafted MIC image files. Exposure is limited to services that handle untrusted MIC images, have the optional olefile package installed, and use frame-count or save-all routines; default Pillow deployments are unaffected. No public exploit identified at time of analysis, but leadership should prioritize remediation because affected image pipelines could suffer service disruption without data confidentiality or integrity impact.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
High
Pillow is the de facto Python imaging library, embedded across countless web and data services
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

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
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Medium
Technical Impact
Partial

Priority Score

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