---
id: CVE-2026-112390
title: 'Pillow: Infinite loop in MIC n_frames when the embedded TIFF'
summary: >-
  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 ind…
severity: high
cvss: 8.2
cvssVector: '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'
cvssSource: cna
cwe:
  - CWE-835
vendor: python-pillow
product: Pillow
affected:
  - 'Pillow >= 7.2.0, < 13.0.0'
published: '2026-10-19'
updated: '2026-10-19'
sourceUpdated: '2026-10-19T20:35:39.189Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-112390'
references:
  - url: >-
      https://github.com/python-pillow/Pillow/security/advisories/GHSA-22hg-r758-rrw9
    label: >-
      https://github.com/python-pillow/Pillow/security/advisories/GHSA-22hg-r758-rrw9
  - url: >-
      https://github.com/python-pillow/Pillow/commit/26cb3ed061173b817b9ee4b6f507cb0e1e293218
    label: >-
      https://github.com/python-pillow/Pillow/commit/26cb3ed061173b817b9ee4b6f507cb0e1e293218
  - url: 'https://github.com/python-pillow/Pillow/releases/tag/13.0.0'
    label: 'https://github.com/python-pillow/Pillow/releases/tag/13.0.0'
tags:
  - cve.org
ingestedAt: '2026-10-19T21:43:56.164Z'
---

## Overview

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.

## Affected

- `Pillow >= 7.2.0, < 13.0.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
