CVE-2026-112390 in Pillowinfo

Summary

by MITRE • 10/20/2026

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.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 10/20/2026

The vulnerability identified within the Pillow imaging library represents a significant availability risk stemming from improper handling of embedded image formats, specifically affecting versions ranging from 7.2.0 through 13.0.0. Pillow serves as a foundational Python Imaging Library widely utilized in web applications for processing user-uploaded images, making it a frequent target for automated scanning and ingestion pipelines. The core issue resides within the MICImageFile class, which is designed to handle Microsoft Image Composer files. This format often contains embedded TIFF (Tagged Image File) data structures that require complex frame traversal logic to enumerate or extract individual frames from multi-frame documents.

The technical flaw arises from a mismatch in state management between the OLE (Object Linking and Embedding) container layer and the underlying TIFF parsing engine. When processing an MIC file, Pillow relies on olefile to parse the compound document structure. The MicImageFile class inherits its frame traversal mechanisms from the standard TIFF handler but fails to correctly synchronize the internal cursor position with the expectations of the parent OLE stream index. Specifically, while the tell method reports the current offset within the OLE stream, the seek operation intended to reset or advance the TIFF frame state does not properly align with this reporting mechanism. This desynchronization creates a logical deadlock where the parser cannot determine when it has reached the end of the embedded image data.

This logic error manifests most severely in crafted MIC files that contain an embedded TIFF structure with at least three Image File Directories, or IFDs. An IFD is a data structure within a TIFF file that contains metadata and pointers to image data. When the parser encounters such a multi-IFD structure, it enters an infinite loop because the state reset mechanism fails to advance past the current frame index effectively. Consequently, any application invoking operations like reading n_frames or saving all frames from these maliciously crafted files will trigger this non-advancing traversal logic. The result is that the worker thread handling the image processing consumes one hundred percent of a CPU core indefinitely, leading to a denial of service condition for the hosting application and potentially affecting other processes on the same system due to resource exhaustion.

From an industry standards perspective, this vulnerability aligns with CWE-835, which describes loops that do not terminate or loop infinitely. It also relates closely to CWE-400, concerning uncontrolled resource consumption, as the infinite loop directly leads to CPU saturation and potential service disruption. In terms of adversary tactics, this flaw can be leveraged within ATT&CK technique T1496, Resource Hijacking, where an attacker uses compromised or maliciously crafted inputs to consume computational resources for denial-of-service purposes rather than data exfiltration or system control. The vulnerability highlights the critical importance of robust input validation and state management in libraries that parse complex, nested binary formats.

Mitigation strategies primarily involve upgrading Pillow to version 13.0.0 or later, where this specific logic error has been resolved by correcting the synchronization between OLE stream indexing and TIFF frame traversal states. For environments unable to immediately upgrade, implementing strict input validation is recommended. This includes limiting the complexity of embedded structures in uploaded images, restricting the maximum number of frames that can be processed per request, and enforcing timeouts on image processing operations to prevent indefinite hangs. Additionally, deploying these libraries within sandboxed containers or worker processes with limited CPU quotas can mitigate the impact of such denial-of-service attempts by containing the resource exhaustion before it affects critical system services.

Responsible

GitHub M

Reservation

10/19/2026

Disclosure

10/20/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!