GHSA-3j72-p6qg-6xp7
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessUpload crafted TAR to TarIO-using app
-
DeliveryHeader encodes negative octal member size
-
ExploitBackward seek returns to same 512-byte header
-
ExecutionParser re-reads header indefinitely
-
ImpactCPU 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – 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)
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
Affected Packages
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
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
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).
Primary rating from Vendor (CNA).
CVSS VectorVendor
Lifecycle Timeline
4Description PRE-NVD
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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-107561
NVD
CVE.org
EPSS
Exploit-DB