Description
Pillow is a Python imaging library. From 11.0.0 until 13.0.0, multi-frame loaders can retain an ImagingCore allocation created for a narrow frame mode while a later frame of the same dimensions changes the logical mode and decoder tiles to wider RGB or CMYK data. ImageFile.load_prepare() reuses the stale native storage because _im is non-null without verifying that its mode and size still match. Crafted PSD, MPO, DCX, or MIC frame transitions can then write wider pixels into the narrow allocation, causing native out-of-bounds writes and crashes. The MPO path can also cause a native over-read and, in demonstrated runtime-specific profiles, command execution. This issue is fixed in version 13.0.0.
Published: 2026-10-21
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

Pillow, the Python imaging library, has a flaw that allows a malicious image to overwrite memory allocated for a different image mode. The bug arises when a multi‑frame loader creates a narrow storage buffer for one frame and later reuses it for a frame that uses a wider mode such as RGB or CMYK without verifying the buffer size. This can trigger a native out‑of‑bounds write or, in certain profiles, a native over‑read, which may lead to a crash or even execution of arbitrary code. The vulnerability is mapped to CWE‑125 and CWE‑787 and is scored CVSS 9.8.

Affected Systems

The flaw affects the Pillow library for versions 11.0.0 through 12.x.x that support multi‑frame image formats such as PSD, MPO, DCX, and MIC. It is fixed in Pillow 13.0.0 and later. Users of older Pillow versions that process external images are at risk.

Risk and Exploitability

The CVSS score of 9.8 indicates severe impact. As the EPSS score is not available, no quantified likelihood of exploitation is present, but the existence of a confirmed arbitrary‑code‑execution path suggests that the risk is significant. The attack vector and exploitation details are inferred from the CVE description and would involve delivering a crafted image – locally or over a network – to any code that uses Pillow to load or manipulate it. Since many web frameworks and image‑processing pipelines rely on Pillow, the vulnerability can affect a wide range of applications.

Generated by OpenCVE AI on October 22, 2026 at 06:39 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Pillow to version 13.0.0 or later to apply the vendor‑supplied fix.
  • If an upgrade is not possible, limit Pillow usage to images that do not trigger multi‑frame mode transitions, such as single‑frame PNG or JPEG, and disable support for PSD, MPO, DCX, and MIC until the library is patched.
  • Monitor applications that load images for unexpected crashes or abnormal memory usage and consider running Pillow in a sandboxed or resource‑controlled environment to mitigate potential exploitation.

Generated by OpenCVE AI on October 22, 2026 at 06:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-v9pv-5gc8-w2m6 Pillow multi-frame loaders can reuse stale native image storage after mode transitions
History

Tue, 03 Nov 2026 00:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Critical


Thu, 29 Oct 2026 12:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 27 Oct 2026 14:45:00 +0000

Type Values Removed Values Added
First Time appeared Python
Python pillow
CPEs cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*
Vendors & Products Python
Python pillow

Thu, 22 Oct 2026 04:45:00 +0000

Type Values Removed Values Added
First Time appeared Python-pillow
Python-pillow pillow
Vendors & Products Python-pillow
Python-pillow pillow

Wed, 21 Oct 2026 21:15:00 +0000

Type Values Removed Values Added
Description Pillow is a Python imaging library. From 11.0.0 until 13.0.0, multi-frame loaders can retain an ImagingCore allocation created for a narrow frame mode while a later frame of the same dimensions changes the logical mode and decoder tiles to wider RGB or CMYK data. ImageFile.load_prepare() reuses the stale native storage because _im is non-null without verifying that its mode and size still match. Crafted PSD, MPO, DCX, or MIC frame transitions can then write wider pixels into the narrow allocation, causing native out-of-bounds writes and crashes. The MPO path can also cause a native over-read and, in demonstrated runtime-specific profiles, command execution. This issue is fixed in version 13.0.0.
Title Pillow multi-frame loaders can reuse stale native image storage after mode transitions
Weaknesses CWE-125
CWE-787
References
Metrics cvssV3_1

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


Subscriptions

Python Pillow
Python-pillow Pillow
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-29T10:51:37.735Z

Reserved: 2026-09-23T14:35:50.130Z

Link: CVE-2026-96639

cve-icon Vulnrichment

Updated: 2026-10-29T10:51:30.385Z

cve-icon NVD

Status : Analyzed

Published: 2026-10-21T21:20:32.217

Modified: 2026-10-29T11:17:39.023

Link: CVE-2026-96639

cve-icon Redhat

Severity : Critical

Publid Date: 2026-10-21T21:06:42Z

Links: CVE-2026-96639 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-22T06:45:17Z

Weaknesses