CVE-2026-96642
Medium · 6.5CVSS
6.5
EPSS
0.3%
Published
Oct 21, 2026
CISA due date
—
Cloudanix analysis
A bug in a popular Python library for handling images can cause programs that open certain tar files to freeze and use up all available processing power until restarted.
- 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
The TarIO initializer accepts a negative octal member size, computes a backward seek to the same 512-byte header block, and enters an infinite loop repeatedly reading that header whenever the requested member name does not match, consuming a full CPU core without returning.
Why it matters to the business
Applications that directly instantiate PIL.TarIO.TarIO on untrusted input can experience complete loss of responsiveness and sustained high CPU usage, leading to service degradation or outage for any workload that invokes the affected code path.
How an attack unfolds
An attacker supplies a specially crafted tar archive containing a negative octal size field and a mismatched member name; when the target application passes this archive to TarIO.TarIO the parser repeatedly seeks to and reads the same header block, exhausting CPU resources and never returning control to the caller.
How to fix it
Upgrade Pillow to version 13.0.0 or later; after upgrade, audit any code that directly imports or instantiates PIL.TarIO.TarIO and replace such usage with the standard Image.open path where possible.
How to confirm the fix worked
Confirm the installed Pillow version is 13.0.0 or newer; attempt to open a crafted tar file containing a negative size field through the direct TarIO path and verify that the call either raises an exception promptly or returns without consuming excessive CPU.
Typical attack path
- Craft a tar archive with a negative octal member size and a name that will not match the requested member
- Deliver the archive to an application that directly calls PIL.TarIO.TarIO rather than Image.open
- Trigger the TarIO initializer with the supplied archive
- Observe sustained 100 % CPU consumption on a single core and non-termination of the call
How to detect it
Review application logs and system performance metrics for Python processes that suddenly consume 100 % of a CPU core while parsing tar archives; correlate with any direct calls to TarIO in source or stack traces.
What your security team should do
- Immediately upgrade all Pillow installations to 13.0.0 or later
- Search source code for direct use of PIL.TarIO.TarIO and refactor to Image.open
- Add the TarIO module to any internal block-list of image-handling code that should not be invoked on untrusted data
- Monitor CPU utilization of Python processes that handle tar or image files as a temporary compensating control
The record
Pillow is a Python imaging library. Prior to 13.0.0, the TarIO initializer in src/PIL/TarIO.py accepts a negative octal member size and computes a backward seek that returns to the same 512-byte header. When the requested member name does not match, the parser repeatedly reads that header, consumes a full CPU core, and never returns. TarIO is reached only when an application directly uses PIL.TarIO.TarIO rather than the default Image.open() path. This issue is fixed in version 13.0.0.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-62250 LibreDWG is a free C library to read and write DWG files. CWE-835
- CVE-2026-119205 pypdf is a free and open-source pure-python PDF library. CWE-835
- CVE-2026-119203 pypdf is a free and open-source pure-python PDF library. CWE-835
- CVE-2026-118781 Forge (also called node-forge) is a native implementation of Transport Layer Security in… CWE-835
- CVE-2026-111731 P-Net before 1.0.3 enters an infinite loop when handling a read request for the… CWE-835
- CVE-2026-111496 Kafka Streams derives its stream-time clock from record timestamps. CWE-835
- CVE-2026-103410 An Integer Overflow vulnerability in the DPI certificate scanner in Juniper Networks… CWE-835
- CVE-2026-118036 In Progress® Telerik® Document Processing Libraries prior to version 2026.3.1027… CWE-835