Skip to main content

Python Pillow EUVDEUVD-2026-43739

| CVE-2026-59199 HIGH
Integer Overflow or Wraparound (CWE-190)
2026-07-14 GitHub_M GHSA-6r8x-57c9-28j4
7.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach app endpoint accepting image coordinates
  2. Delivery
    Submit box near ±2**31 limits
  3. Exploit
    Overflow 32-bit size subtraction in libImaging
  4. Execution
    Heap out-of-bounds write in paste/fill
  5. Impact
    Worker crash / denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The vulnerable code path is reached only when an application passes a box/coordinate tuple containing values near the signed 32-bit integer limits (approximately ±2147483648) into Image.paste(), Image.crop(), or Image.alpha_composite() on a Pillow build prior to 12.3.0. The concrete precondition is that these coordinate parameters must be attacker-influenced - an app that hardcodes or tightly validates crop/paste boxes is not exploitable. Limiting factors: exploitation depends on the application surfacing raw coordinate input to these specific APIs (non-universal usage), impact is confined to availability/crash per the CVSS vector (C:N/I:N/A:H), and no user interaction or authentication is indicated (PR:N/UI:N).

Impact

The published CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N, A:H, C:N/I:N) rates this 7.5 as a network, unauthenticated availability issue - but that network reachability is conditional: exploitation requires an application to pass attacker-influenced coordinates directly into paste/crop/alpha_composite, which is not a universal usage pattern. Where coordinates are hardcoded or server-derived, remote reach effectively drops to none. No EPSS score was provided; the CVE is not listed in CISA KEV, and no weaponized POC is referenced - only the fix PR's trigger tests. Impact is scoped by NVD to availability (crash/DoS) despite the underlying primitive being a heap OOB write, so worst-case memory corruption beyond DoS is unproven from the available data. Net: a genuine, easily-triggered crash bug for exposed image-processing services, but 'critical-priority' status hinges on whether your app actually exposes coordinate parameters - verify usage rather than treating AV:N as automatically remotely reachable.

Exploit ScenarioDerived

A web service lets users crop or composite uploaded images by submitting box coordinates via an API. An attacker submits a request with coordinates near the 32-bit limits (e.g. left=2147483647, right=-2147483648); the size subtraction overflows in libImaging and Pillow performs a heap out-of-bounds write, crashing the worker process and denying service. No authentication is indicated by the CVSS vector, and no public exploit code is referenced - only the fix PR's trigger inputs.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 14, 2026

Denial of service (and potential memory corruption) in Python Pillow before 12.3.0 arises when public image coordinate APIs - Image.paste(), Image.crop(), and Image.alpha_composite() - are handed box coordinates near the signed 32-bit integer boundary (±2**31), causing a native heap out-of-bounds write in the C imaging core. Any application that forwards untrusted coordinate values into these calls can be crashed, and the OOB write raises the theoretical prospect of heap corruption. No public exploit identified at time of analysis; the fix (integer-overflow-safe int64_t arithmetic) shipped in 12.3.0.

RemediationAI

Vendor-released patch: 12.3.0 - upgrade to Pillow 12.3.0 or later (pip install --upgrade 'Pillow>=12.3.0'), which replaces the overflow-prone 32-bit size arithmetic with int64_t math (commit ceefc348eb3c3844c7f9796ef2cc3a7dd5fbba7b, PR https://github.com/python-pillow/Pillow/pull/9703). Consult the advisory at https://github.com/python-pillow/Pillow/security/advisories/GHSA-6r8x-57c9-28j4. If you cannot upgrade immediately, apply application-side input validation: clamp/reject any user-supplied box coordinates for paste/crop/alpha_composite to sane image bounds (well within a few multiples of the actual image dimensions) before calling Pillow - this closes the trigger with essentially no functional side effect since legitimate coordinates are never near ±2**31. Avoid exposing raw coordinate parameters from untrusted HTTP input to these APIs; the trade-off is minor added validation code versus a hard-to-detect native crash.

Affected VersionsENISA

Pillow < 12.3.0

Affected Packages

pypi pillow fix: 12.3.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Pillow (python-pillow, cpe:2.3:a:python-pillow:pillow) is the de-facto Python imaging library, wrapping performance-critical routines in a C extension (libImaging). The flaw is a classic CWE-190 integer overflow: in ImagingPaste (Paste.c) and ImagingFill2 the region width/height were computed as 32-bit ints via xsize = dx1 - dx0 and ysize = dy1 - dy0. When box coordinates approach INT32_MIN/INT32_MAX (e.g. (231-1, 0, -(231), 1)), that subtraction overflows, yielding a bogus size that drives a heap write past the allocated pixel buffer. The upstream fix casts to int64_t before subtraction (xsize = (int64_t)dx1 - dx0) so the intermediate difference cannot wrap, and adds regression tests that expect a clean ValueError ('images do not match') instead of a memory-unsafe operation.

Know when Pillow gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 5.9 MEDIUM

Impact is a crash (A:H, no C/I); AC:H because it requires the app to forward attacker-controlled coordinates and specific near-INT32-boundary values, so reachability is conditional though unauthenticated.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 6.2 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat 7.5 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch available
Jul 14, 2026 - 18:20 EUVD
CVE Published
Jul 14, 2026 - 15:42 cve.org
HIGH 7.5

DescriptionCVE.org

Pillow is a Python imaging library. Prior to 12.3.0, Pillow public image coordinate APIs can trigger a native heap out-of-bounds write when given coordinates near the signed 32-bit integer limits in Image.paste(), Image.crop(), or Image.alpha_composite(). This issue is fixed in version 12.3.0.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2,739 pypi packages depend on pillow (1,116 direct, 1,651 indirect)

Ecosystem-wide dependent count for version 12.3.0.

Executive ViewAI

Why It Matters

Python Pillow image processing libraries (versions before 12.3.0) contain a vulnerability in coordinate handling that causes denial of service and potential memory corruption when processing untrusted image data. Organizations using Pillow for image uploads or external image processing face immediate service availability risks and require prompt remediation.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 69% exploitable
Prevalence
High
Pillow is the dominant Python imaging library, a dependency of countless web apps
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

58
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

More in Pillow

View all
CVE-2022-30595 CRITICAL POC
9.8 May 25

libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files. Rated

CVE-2026-59204 HIGH POC
8.7 Jul 14

Denial of service in Python Pillow (versions 8.2.0 through 12.2.0) allows remote attackers to exhaust memory during JPEG

CVE-2026-54058 HIGH POC
8.3 Jul 14

Out-of-bounds memory disclosure in Python Pillow before 12.3.0 lets an attacker who supplies a crafted McIdas AREA image

CVE-2026-59197 HIGH POC
8.2 Jul 14

Heap out-of-bounds write in Python Pillow prior to 12.3.0 lets an attacker who controls the rank-filter size parameter c

CVE-2026-59205 HIGH POC
7.5 Jul 14

Denial-of-service and controlled heap corruption in Python's Pillow imaging library (all versions prior to 12.3.0) occur

CVE-2026-59203 HIGH POC
7.5 Jul 14

Denial of service in Python Pillow 12.0.0 through 12.2.0 lets a remote attacker hang an application by supplying a craft

CVE-2026-55379 HIGH POC
7.5 Jul 06

Uncontrolled memory allocation in Python Pillow before 12.3.0 lets a crafted BDF font file exhaust available memory and

CVE-2026-59200 HIGH POC
7.5 Jul 14

Uncontrolled memory consumption in Python Pillow (PIL) versions 5.1.0 through 12.2.x allows a remote attacker to cause d

CVE-2026-55380 HIGH POC
7.5 Jul 06

Denial-of-service via memory exhaustion in Python Pillow before 12.3.0 allows a crafted GD-format (.gd) image to trigger

CVE-2026-54060 HIGH POC
7.5 Jul 06

Uncontrolled memory allocation in Python Pillow before 12.3.0 allows a maliciously crafted font file to trigger excessiv

CVE-2026-54059 HIGH POC
7.5 Jul 06

Uncontrolled memory allocation in the Python Pillow imaging library (all versions prior to 12.3.0) allows a crafted PCF

CVE-2026-59198 HIGH POC
7.5 Jul 14

Out-of-bounds heap read in Python Pillow's TGA RLE encoder (versions 5.2.0 through 12.2.x) lets adjacent process heap by

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Module for Package Hub 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy