Skip to main content

Pillow CVE-2026-96642

| EUVDEUVD-2026-107561 HIGH
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
7.1
CVSS 4.0 · Vendor
View

Attack ChainAIDerived

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

  1. Access
    Upload crafted TAR to TarIO-using app
  2. Delivery
    Header encodes negative octal member size
  3. Exploit
    Backward seek returns to same 512-byte header
  4. Execution
    Parser re-reads header indefinitely
  5. Impact
    CPU core exhausted, worker hangs (DoS)

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

Exploitation requires that the target application directly invoke PIL.TarIO.TarIO on an attacker-controlled TAR archive - the default Image.open() code path does NOT reach this parser and is unaffected. The malicious archive must contain a tar header with a negative octal member size (e.g. '-1') for a member whose name does not match the requested file, which drives the backward seek back onto the same 512-byte header. The decisive limiting factor is this non-default API usage: only applications that deliberately use the legacy TarIO interface on untrusted input are exposed, which dramatically narrows the real attack surface despite the network-reachable CVSS vector. A further limiter is UI:P - a user or service must supply/process the crafted archive. Affected: all Pillow versions prior to 13.0.0.

Impact

This is a CWE-835 uncontrolled-loop denial of service in Pillow's legacy TarIO parser, and the raw CVSS 4.0 score of 7.1 overstates its real-world priority. The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H) correctly shows an availability-only impact with no confidentiality or integrity loss - this cannot be used for code execution or data theft, only to hang a process by pinning one CPU core. The single most important mitigating signal is NOT in the CVSS vector: the description states TarIO is reached ONLY when an application directly calls PIL.TarIO.TarIO, never via the default Image.open() path, so the vast majority of Pillow deployments are not exposed at all. No EPSS score, KEV listing, or public POC was provided in the input; a regression test accompanies the fix commit but a standalone weaponized exploit is not referenced. Net assessment: genuinely patch-worthy for the narrow set of applications that use the TarIO API on untrusted archives, but a low operational priority for the typical Pillow user. Conflicting signal to verify: CVSS marks AV:N/PR:N/UI:P (network, unauthenticated, passive interaction), yet exploitation depends on a non-default code path the operator must have chosen to use - a deployment precondition CVSS does not capture.

Exploit ScenarioDerived

An application that accepts user-uploaded TAR archives and opens image members by calling PIL.TarIO.TarIO directly is given a crafted archive whose header encodes a negative octal member size for a member name that does not match the requested one. The parser computes a backward seek back to the same 512-byte header and re-reads it forever, consuming a full CPU core and never returning, hanging the worker. No public exploit is identified at time of analysis, though the fix commit includes a regression test demonstrating the condition.

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

Denial of service in Pillow's legacy TarIO parser (all versions before 13.0.0) allows remote unauthenticated attackers to supply a crafted TAR archive that traps the parser in an uncontrolled loop, consuming a full CPU core and never returning. The exposure is sharply limited because only applications that directly call PIL.TarIO.TarIO on attacker-controlled archives are affected; the default Image.open() path does not reach this parser. No public exploit code was identified at time of analysis, and the raw 7.1 CVSS 4.0 score should be weighed against the non-default API prerequisite and required user or service interaction to supply the malicious archive.

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

Pillow's TarIO helper (PIL.TarIO), which exposes image members inside tar archives as file-like objects, enters an unbounded CPU-spin loop when a tar member header reports a negative size field, letting a crafted archive pin a CPU core indefinitely. Only code paths that deliberately open attacker-influenced tar archives through TarIO are exposed - ordinary Image.open() calls on image files never touch this reader - and the assessed vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, i.e. unauthenticated availability-only denial of service with no memory corruption, code execution, or data disclosure. The flaw is rated Medium in the Pillow 13.0.0 security release and is fixed in that version; no public exploit identified at time of analysis.

RemediationAI

Upgrade to Pillow 13.0.0 or later; this is the vendor-released patch and includes a check that rejects non-positive TarIO offsets. The fix is documented in the 13.0.0 release notes (https://pillow.readthedocs.io/en/stable/releasenotes/13.0.0.html), the GitHub security advisory (https://github.com/python-pillow/Pillow/security/advisories/GHSA-3j72-p6qg-6xp7), and the upstream commit (https://github.com/python-pillow/Pillow/commit/19b695fdcc5eddc37374e2b1645fc4185edaf71d). If immediate upgrade is not possible, stop passing untrusted TAR archives to PIL.TarIO.TarIO, validate TAR member size fields before parsing and reject negative or zero sizes, or isolate the parsing service with CPU limits and timeouts; these compensating controls reduce exposure but do not remove the vulnerable code. The default Image.open() path does not reach TarIO, so applications that never use TarIO do not need a workaround. Upgrading remains the definitive remediation for applications that use TarIO on untrusted input.

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

CVE-2026-96642 is a CWE-835 uncontrolled-loop flaw in src/PIL/TarIO.py. TarIO parses 512-byte TAR headers and advances by the member size rounded up to a 512-byte boundary. A crafted header can encode a negative octal member size, making the computed offset non-positive and causing the parser to seek backward to the same 512-byte header. When the requested member name does not match, the parser repeatedly reads that header without making progress, consuming CPU and never returning. The upstream fix adds an offset <= 0 check that raises ValueError('offset must be positive'), with regression tests covering sizes '-1' and '0'. The vulnerable code is reachable only through direct use of PIL.TarIO.TarIO, not through Image.open().

Know when Python 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

A crafted archive supplied to a service is unauthenticated and low-complexity (PR:N/AC:L), but the app must process it via the non-default TarIO API (UI:R); impact is availability-only CPU exhaustion (A:H, C/I:N).

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:30 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

CWE-835, Loop with Unreachable Exit Condition ("Infinite Loop") in TarIO.init in src/PIL/TarIO.py.

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 widely embedded in internal tooling and customer-facing pipelines, carries a high-severity availability flaw in a legacy TAR-parsing interface that most deployments never invoke. Exposure is narrow: only services that deliberately route untrusted TAR archives through the TarIO API risk a stalled process that can consume a full CPU core, while the standard Image.open() path remains unaffected. With no public exploit identified at time of analysis, leadership should treat this as a targeted inventory and hygiene task rather than a broad emergency.

Business Impact: Medium
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: avoid calling PIL.TarIO.TarIO on untrusted archives and rely on the default Image.open() path, enforce archive entry-count and size limits plus parsing timeouts, sandbox archive parsing in resource-capped containers with CPU quotas and watchdogs, restrict who may submit TAR files, and monitor affected workers for runaway process CPU consumption.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
High
Pillow is among the most widely deployed Python imaging libraries
Threat Intel
1
1 source
Social Media
1
Sightings
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 Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

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