CVE-2026-112405 · GHSA-cp9v-662q-vvx9
Pillow: NULL pointer dereference in Image.merge via an unvalidated band 0
- Risk score
- 66/100
- CVSS
- 8.7 v4.0
- Exploit chance (30 days)
- 0.3%
- Published
- 19 Oct 2026
Open in the live forecast Today's forecast
What to know
- What it is
- Pillow's Image.merge() function can dereference a null image8 plane, causing a native process crash. An attacker can exploit this vulnerability by crafting a malicious IPTC file or invoking Image.merge() directly with a crafted input.
- Affected
- {'products': ['Pillow'], 'packages': [{'ecosystem': 'pip', 'name': 'pillow', 'vulnerable': '>= 12.0.0, < 13.0.0'}], 'versions': ['12.0.0', '13.0.0']}
- Fix
- Upgrade to version 13.0.0 or later
- Exploitation
- No known exploitation
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-112405: Pillow: NULL pointer dereference in Image.merge via an unvalidated band 0 (CVSS 8.7 · EPSS 0%)
- CVE-2026-112393: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO (CVSS 9.2 · EPSS 1%)
- CVE-2026-96639: Pillow multi-frame loaders can reuse stale native image storage after mode transitions (CVSS 9.8 · EPSS 1%)
- CVE-2026-112900: Argument Injection in Ghostscript call, potentially leading into RCE (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: Null pointer dereference (CWE-476). 91 other warnings in 30 days
Why it is Amber
- CVSS 8.7 high
- Remotely exploitable without logging in
- On your watchlist: PyPI
Affected packages
| Package | Ecosystem | Vulnerable | Fixed in |
|---|---|---|---|
| pillow | pip | >= 12.0.0, < 13.0.0 | 13.0.0 |
References
- https://github.com/advisories/GHSA-cp9v-662q-vvx9
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-cp9v-662q-vvx9
- https://nvd.nist.gov/vuln/detail/CVE-2026-112405
- https://github.com/python-pillow/Pillow/commit/b6ee66e8b2c2c0932bdf65f963268d9f2927ef86
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0
- https://github.com/advisories/GHSA-cp9v-662q-vvx9
Original description
Pillow is a Python imaging library. From 12.0.0 until 13.0.0, Pillow's Image.merge() can dereference a null image8 plane. Validation skips the first input band, allowing a 32-bit integer or floating-point image backed by image32 storage to be merged as a narrower multiband image. A crafted IPTC file can reach this path when an application opens and loads it, or a caller can invoke Image.merge() directly with such a first band. This causes a native process crash. This issue is fixed in version 13.0.0.
Last activity 19 Oct 2026. Patch Forecast updates every hour.