CVE-2026-96639 · GHSA-v9pv-5gc8-w2m6
Pillow multi-frame loaders can reuse stale native image storage after mode transitions
- Risk score
- 78/100
- CVSS
- 9.8 v3.1
- Exploit chance (30 days)
- 0.6%
- Published
- 21 Oct 2026
Open in the live forecast Today's forecast
What to know
- What it is
- Pillow library has a vulnerability in its multi-frame loaders, allowing attackers to cause native out-of-bounds writes and crashes, and potentially command execution. This can be exploited by crafting specific frame transitions in PSD, MPO, DCX, or MIC files.
- Affected
- {'products': ['Pillow'], 'packages': ['Pillow'], 'versions': ['>= 11.0.0, < 13.0.0']}
- Fix
- Upgrade to version 13.0.0 or later
- Exploitation
- Public proof of concept
Story map
At a glance
Pillow: Amber, patch this week. Pillow has a heap buffer overflow and stale-heap disclosure in _tiffWriteProc when saving compressed TIFF data through libtiff to a target without a usable fileno(). This can crash the process and may allow code execution.
The flaws
- CVE-2026-96639: Pillow multi-frame loaders can reuse stale native image storage after mode transitions (CVSS 9.8 · EPSS 1%)
- CVE-2026-112393: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO (CVSS 9.2 · EPSS 1%)
- CVE-2026-112900: Argument Injection in Ghostscript call, potentially leading into RCE (CVSS 9.2 · EPSS 0%)
- CVE-2026-112403: Heap buffer overflow in ImagingJpegDecode (CVSS 9.2 · EPSS 0%)
The fix
Upgrade Pillow: 13.0.0 or later on your release line
Who is exposed: {'products': ['Pillow'], 'packages': ['Pillow'], 'versions': ['>= 2.0.0, < 13.0.0']}
Where it stands
- Public proof of concept
- 1 outlet covering it
How it unfolded
- 23 Oct, The Hacker News (press): Critical Flaw in Python’s Popular Pillow Image Library Allows Code Execution via a Crafted Image
Connects to
- Same weakness: Out-of-bounds read (CWE-125). 373 other warnings in 30 days
Why it is Amber
- CVSS 9.8 critical
- Remotely exploitable without logging in
- On your watchlist: PyPI
Affected packages
| Package | Ecosystem | Vulnerable | Fixed in |
|---|---|---|---|
| Pillow | pip | >= 11.0.0, < 13.0.0 | 13.0.0 |
References
- https://github.com/advisories/GHSA-v9pv-5gc8-w2m6
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-v9pv-5gc8-w2m6
- https://nvd.nist.gov/vuln/detail/CVE-2026-96639
- https://github.com/python-pillow/Pillow/pull/10105
- https://github.com/python-pillow/Pillow/commit/78d97d994579aef81aafe123773d525f40f2522a
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0
- https://github.com/advisories/GHSA-v9pv-5gc8-w2m6
Original 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.
Last activity 21 Oct 2026. Patch Forecast updates every hour.