CVE-2026-112390

Pillow: Infinite loop in MIC n_frames when the embedded TIFF

Published Oct 19, 2026 CVSS 4.0 · 8.2 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

Pillow, the Python imaging library, can enter an infinite loop while determining the frame count of a MIC image when an embedded TIFF contains at least three image file directories. MicImageFile inherits TIFF traversal logic, but its tell() method reports the OLE stream index and its seek() resets TIFF frame state, so the traversal never advances. When an application with olefile installed reads n_frames or attempts to save all frames from a crafted MIC file, the non‑advancing traversal can keep a worker thread on 100 % CPU indefinitely, effectively causing a denial‑of‑service. This is an infinite‑loop vulnerability (CWE‑835) that can compromise availability of any process that imports Pillow and processes MIC files.

Affected Systems

Python‑Pillow versions 7.2.0 through 13.0.0 are affected. The issue is present in all builds of Pillow that contain the MicImageFile class and are used together with the olefile package. Any application that loads MIC files, calls n_frames, or attempts to export all frames from a crafted MIC image is susceptible. The defect was corrected in Pillow release 13.0.0, so upgrading to that version or later removes the vulnerability.

Risk and Exploitability

The CVSS score of 8.2 indicates a high severity denial‑of‑service risk. The EPSS score is not available, so the current exploitation probability is unknown, but the lack of mitigations means that a malicious MIC file supplied to a vulnerable application can drive CPU usage to 100 % and stall the process. The vulnerability is not listed in the CISA KEV catalog, yet the attack vector requires either local or remote delivery of a crafted MIC file to an application that imports Pillow. If the application processes user‑supplied files, an attacker could trigger the loop by uploading a malicious MIC image, coercing the host into a denial‑of‑service state.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Pillow to version 13.0.0 or later where the infinite‑loop issue is resolved.
  • Restrict processing of MIC files to trusted or sandboxed environments and avoid calling n_frames or exporting all frames on untrusted input.
  • If upgrade cannot be done immediately, consider temporarily removing the olefile dependency or performing image type validation to detect and reject malicious MIC files before they trigger the loop.

Generated by OpenCVE AI on October 20, 2026 at 06:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-22hg-r758-rrw9 Pillow: Infinite loop in MIC n_frames when the embedded TIFF
History
Type Values Removed Values Added
First Time appeared Python
Python pillow
CPEs cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*
Vendors & Products Python
Python pillow
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Important

Type Values Removed Values Added
First Time appeared Python-pillow
Python-pillow pillow
Vendors & Products Python-pillow
Python-pillow pillow
Type Values Removed Values Added
Description 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.
Title Pillow: Infinite loop in MIC n_frames when the embedded TIFF
Weaknesses CWE-835
References
Metrics cvssV4_0

{'score': 8.2, 'vector': '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'}

Weaknesses
  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 20, 2026, 3:02 PM
Reserved
Oct 19, 2026, 4:58 PM
Status
Analyzed
Published
Oct 19, 2026, 9:17 PM
Modified
Oct 23, 2026, 5:01 PM
Severity
Important
Public date
Oct 19, 2026, 8:35 PM