CVE-2026-96639: CWE-125: Out-of-bounds Read in python-pillow 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
Affected software
python-pillow
Pillow
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
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.