Patch Forecast
Red warning
Act within 24 hours.

CVE-2026-59197

Pillow is a Python imaging library

Risk score
82/100
CVSS
8.2 v3.1
Exploit chance (30 days)
0.4%
Published
14 Jul 2026

Open in the live forecast Today's forecast

What to know

What it is
Pillow's public rank-filter API can trigger a native heap out-of-bounds write when given a very large odd filter size, allowing an attacker to potentially gain elevated privileges.
Affected
{'product': 'pillow', 'affected_versions': 'prior to 12.3.0'}
Fix
Upgrade to version 12.3.0 or later
Exploitation
Public proof of concept

Story map

Story map: PillowTHE FLAWSTHE FIXCVE-2026-59197Pillow is a Python imaginglibraryCVSS 8.2 · EPSS 0%CVE-2026-112900Argument Injection inGhostscript call, potentiallyleading into RCECVSS 9.8 · EPSS 1%CVE-2026-112393Heap buffer overflow in_tiffWriteProc when savingTIFF to BytesIOCVSS 9.8 · EPSS 1%CVE-2026-112403Heap buffer overflow inImagingJpegDecodeCVSS 9.8 · EPSS 1%Upgrade Pillow12.3.0 · 13.0.0or later on your release lineWho is exposed{'products': ['Pillow'],'packages': ['Pillow'], 'versions':['>= 2.6.0, < 13.0.0']}RED · ACT TODAYPillowPillow has a vulnerability in itsGhostscript call, allowingargument injection, which couldlead to remote code execution.An attacker could injectGhostscript arguments bycontrolling the filename.Where it standsPublic proof of concept1 outlet covering itHOW IT UNFOLDEDOfficial record on the left, the press on the right, oldest first.23 Oct · The Hacker NewsCritical Flaw in Python’s Popular Pillow ImageLibrary Allows Code Execution via a Crafted Image4 Nov · Ubuntu security noticesUSN-8999-1: Pillow vulnerabilitiesCONNECTS TOSame weaknessInteger overflow (CWE-190)184 other warnings in 30 days →Same productEarlier Pillow warnings45 in the last 90 days →
Story map: the flaws, the fix, how it unfolded and what it connects to. Boxes link to the record or article.

At a glance

Pillow: Red, act today. Pillow has a vulnerability in its Ghostscript call, allowing argument injection, which could lead to remote code execution. An attacker could inject Ghostscript arguments by controlling the filename.

The flaws

  • CVE-2026-59197: Pillow is a Python imaging library (CVSS 8.2 · EPSS 0%)
  • CVE-2026-112900: Argument Injection in Ghostscript call, potentially leading into RCE (CVSS 9.8 · EPSS 1%)
  • CVE-2026-112393: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO (CVSS 9.8 · EPSS 1%)
  • CVE-2026-112403: Heap buffer overflow in ImagingJpegDecode (CVSS 9.8 · EPSS 1%)

The fix

Upgrade Pillow: 12.3.0 · 13.0.0 or later on your release line

Who is exposed: {'products': ['Pillow'], 'packages': ['Pillow'], 'versions': ['>= 2.6.0, < 13.0.0']}

Where it stands

  • Public proof of concept
  • 1 outlet covering it

How it unfolded

  1. 23 Oct, The Hacker News (press): Critical Flaw in Python’s Popular Pillow Image Library Allows Code Execution via a Crafted Image
  2. 4 Nov, Ubuntu security notices (official): USN-8999-1: Pillow vulnerabilities

Connects to

Why it is Red

  • CVSS 8.2 high
  • Public exploit or proof of concept referenced
  • Remotely exploitable without logging in
  • On your watchlist: python
  • Named in a government or vendor bulletin

Government and vendor bulletins

References

Original description

Pillow is a Python imaging library. Prior to 12.3.0, Pillow's public rank-filter API can trigger a native heap out-of-bounds write when given a very large odd filter size because ImageFilter.RankFilter.filter() calls image.expand(size // 2, size // 2) before rank-filter size validation and ImagingExpand() computes output dimensions with unchecked signed int arithmetic. This issue is fixed in version 12.3.0.

Last activity 4 Nov 2026. Patch Forecast updates every hour.