CVE-2026-96644 · GHSA-9v9v-9qvf-h2hj
Pillow: Heap over-read in WMF/EMF rendering via 16-bit dimension truncation (Windows builds)
- Risk score
- 58/100
- CVSS
- 7.1 v4.0
- Exploit chance (30 days)
- 0.3%
- Published
- 21 Oct 2026
Open in the live forecast Today's forecast
What to know
- What it is
- Pillow is a Python imaging library. Prior to 13.0.0 on Windows, src/PIL/WmfImagePlugin.py passes unchecked 32-bit WMF or EMF dimensions to the native drawwmf handler in src/display.c. The handler sizes a DIB allocation from 16-bit-truncated bcWidth and bcHeight fields but copies pixel data using the original full dime…
- Affected
- Pillow (pip) < 13.0.0
- Fix
- Upgrade Pillow to 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-96644: Heap over-read in WMF/EMF rendering via 16-bit dimension truncation (Windows builds) (CVSS 7.1 · 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: Out-of-bounds read (CWE-125). 347 other warnings in 30 days
Why it is Yellow
- CVSS 7.1 high
- Remotely exploitable without logging in
- On your watchlist: PyPI
Affected packages
| Package | Ecosystem | Vulnerable | Fixed in |
|---|---|---|---|
| Pillow | pip | < 13.0.0 | 13.0.0 |
References
- https://github.com/advisories/GHSA-9v9v-9qvf-h2hj
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-9v9v-9qvf-h2hj
- https://nvd.nist.gov/vuln/detail/CVE-2026-96644
- https://github.com/python-pillow/Pillow/pull/10120
- https://github.com/python-pillow/Pillow/commit/4cf46bee338304c5c8968fd7f132ba0d40c428b7
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0
- https://github.com/advisories/GHSA-9v9v-9qvf-h2hj
Original description
Pillow is a Python imaging library. Prior to 13.0.0 on Windows, src/PIL/WmfImagePlugin.py passes unchecked 32-bit WMF or EMF dimensions to the native drawwmf handler in src/display.c. The handler sizes a DIB allocation from 16-bit-truncated bcWidth and bcHeight fields but copies pixel data using the original full dimensions. A crafted wide, short metafile can pass the pixel-count decompression-bomb check and make the Windows-only renderer read beyond the heap buffer, potentially disclosing memory or crashing the process. This issue is fixed in version 13.0.0.
Last activity 21 Oct 2026. Patch Forecast updates every hour.