Skip to main content

CVE-2026-96639: CWE-125: Out-of-bounds Read in python-pillow Pillow

0
Critical
VulnerabilityCVE-2026-96639cvecve-2026-96639cwe-125cwe-787
Published: 10/21/2026 (10/21/2026, 21:06:42 UTC)
Source: CVE Database V5
Vendor/Project: python-pillow
Product: Pillow

Description

A critical out-of-bounds read and write vulnerability exists in the Pillow Python imaging library versions 11.0.0 through 12.x. Multi-frame loaders can reuse stale native storage allocations when frame mode and size change, leading to memory corruption. This flaw affects PSD, MPO, DCX, and MIC image frame transitions and can cause crashes or, in some cases, command execution. The issue is fixed in version 13.0.0.

CVSS v3.1

Score 9.8critical

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected software

python-pillow

Pillow

Affected versions
>=11.0.0 <13.0.0
pillow
pkg:pypi/pillow
Affected versions
>=11.0.0 <13.0.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/21/2026, 21:45:30 UTC

Technical Analysis

Pillow versions from 11.0.0 up to but not including 13.0.0 contain a vulnerability where multi-frame loaders retain ImagingCore allocations created for narrow frame modes while later frames switch to wider RGB or CMYK modes. The ImageFile.load_prepare() function reuses stale native storage without verifying mode and size consistency, allowing crafted PSD, MPO, DCX, or MIC frames to write wider pixel data into insufficiently sized allocations. This causes native out-of-bounds writes and crashes. Additionally, the MPO processing path can trigger native out-of-bounds reads and has been demonstrated to enable command execution in specific runtime profiles. The vulnerability is tracked as CVE-2026-96639 and is fixed in Pillow 13.0.0.

Potential Impact

Successful exploitation can lead to application crashes due to out-of-bounds memory writes and reads. In certain runtime environments, exploitation of the MPO image path can result in arbitrary command execution, posing a critical security risk. The vulnerability affects confidentiality, integrity, and availability of systems processing maliciously crafted images with vulnerable Pillow versions.

Mitigation Recommendations

Upgrade Pillow to version 13.0.0 or later, where this vulnerability is fixed. No other mitigations are indicated by the vendor advisory. Patch status is confirmed fixed in 13.0.0.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-09-23T14:35:50.130Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6ad92f434d27ba8daa03e67a

Added to database: 10/21/2026, 21:31:47 UTC

Last enriched: 10/21/2026, 21:45:30 UTC

Last updated: 10/21/2026, 21:45:30 UTC

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses