Skip to main content

Python Pillow CVE-2026-59204

| EUVDEUVD-2026-43730 HIGH
Memory Allocation with Excessive Size Value (CWE-789)
2026-07-14 GitHub_M GHSA-vjc4-5qp5-m44j
8.7
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Craft tiled JPEG2000 file
  2. Delivery
    Submit to image-processing endpoint
  3. Exploit
    Pillow accumulates tile widths
  4. Execution
    Trigger oversized memory allocation
  5. Impact
    Exhaust host memory (OOM crash)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
Exploitation Conditions

The target application must accept and decode a JPEG2000 (.jp2/.j2k) image supplied by the attacker using an affected Pillow version (8.2.0-12.2.0), and the malicious file must be tiled so that per-tile widths accumulate - a single-tile image does not trigger the bug. No authentication, privileges, or user interaction are required (PR:N/UI:N) once such an input reaches the decoder. Exploitation is limited to deployments that actually process untrusted JPEG2000 input; services that only handle other formats, or that disable the JPEG2000 plugin, are not exposed. Impact is confined to availability (memory exhaustion / OOM) - no data disclosure or code execution.

Impact

This is a genuine but narrow-impact availability issue rather than a code-execution threat. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N with VC:N/VI:N/VA:H) correctly reflects an unauthenticated, network-reachable, availability-only impact and no confidentiality or integrity effect - consistent with a memory-exhaustion DoS and NOT with the supplied 'Information Disclosure' tag, which appears mislabeled given VC:N. EPSS was not provided and the CVE is not in CISA KEV; with no public exploit identified, real-world exploitation is currently theoretical, though the public patch and diff lower the barrier to weaponization. Practical risk is highest for services that auto-decode user-supplied images (upload pipelines, thumbnailers, image proxies) and is effectively nil for deployments that never process untrusted JPEG2000 input.

Exploit ScenarioDerived

An attacker uploads a small, specially crafted tiled JPEG2000 file to a web service that automatically generates thumbnails or previews with Pillow. When Pillow decodes it, the accumulated tile-width miscalculation drives a massive transient allocation, exhausting memory and crashing the worker or host. No public exploit code has been identified, but the low attack complexity and unauthenticated network vector make abuse straightforward once a payload is constructed from the public patch.

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 in Python Pillow (versions 8.2.0 through 12.2.0) allows remote attackers to exhaust memory during JPEG2000 decoding, causing out-of-memory failures in any application that decodes untrusted images. The flaw stems from Pillow's JPEG2000 decoder summing tile widths across the whole image rather than per tile, so a small crafted tiled file forces disproportionately large transient allocations. There is no public exploit identified at time of analysis and it is not listed in CISA KEV, but the upstream fix (12.3.0) and a public PR/commit make the root cause fully transparent.

RemediationAI

Vendor-released patch: upgrade to Pillow 12.3.0 or later (https://github.com/python-pillow/Pillow/releases/tag/12.3.0); the fix is PR #9704 / commit 13ada41172142f2fd9f0906f615a00ea623a11ca. Where an immediate upgrade is not possible, restrict or disable JPEG2000 decoding by not registering/using the Jpeg2K plugin, or reject .jp2/.j2k uploads at the application boundary - this eliminates the attack surface at the cost of losing JPEG2000 support. As a compensating control, decode untrusted images in a resource-capped sandbox or worker process (cgroup/container memory limits, per-request timeouts) so an OOM kills only the isolated worker rather than the host service; the trade-off is added operational complexity and potential latency. Details are in advisory GHSA-vjc4-5qp5-m44j.

Affected VersionsENISA

Pillow 8.2.0, < 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

The affected component is src/libImaging/Jpeg2KDecode.c, Pillow's C-level decoder built on OpenJPEG for the JPEG2000 (.jp2/.j2k) format, which supports tiling of an image into independently coded regions. The bug is a CWE-789 (Memory Allocation with Excessive Size Value) condition: the variable total_component_width was declared and accumulated once outside the per-tile loop, so each tile added its component width to a running total instead of the value being reset per tile. The fix in PR #9704 simply moves the int total_component_width = 0; declaration inside the per-tile processing block so it is recomputed for each tile, bounding the allocation. The affected CPE is cpe:2.3:a:python-pillow:pillow, i.e. the Pillow package itself, independent of OS or Python version.

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 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Untrusted image reaches the decoder over the network with no auth or interaction (AV:N/AC:L/PR:N/UI:N); impact is pure memory-exhaustion DoS, so C:N/I:N/A:H.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/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
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

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

DescriptionCVE.org

Pillow is a Python imaging library. From 8.2.0 through 12.2.0, src/libImaging/Jpeg2KDecode.c accumulates total_component_width across every tile in a JPEG2000 image instead of recomputing it per tile, allowing a crafted tiled JPEG2000 file to force substantially higher transient memory usage and trigger out-of-memory failures during decoding. 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
  • 140 pypi packages depend on pillow (123 direct, 17 indirect)

Ecosystem-wide dependent count for version 8.2.0.

Executive ViewAI

Why It Matters

Python Pillow, a widely-used image processing library, contains a memory exhaustion vulnerability in JPEG2000 decoding affecting versions 8.2.0 through 12.2.0. Any organization operating applications that process untrusted images-including web services, content platforms, and document processing systems-faces denial-of-service risk when attackers submit specially crafted images. Public disclosure of the root cause creates immediate remediation urgency despite current absence of active exploitation.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Prevalence
Ubiquitous
Pillow is among the most widely deployed Python imaging libraries
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS 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· derived
Out-of-Cycle
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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-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-59199 HIGH POC
7.5 Jul 14

Denial of service (and potential memory corruption) in Python Pillow before 12.3.0 arises when public image coordinate A

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
openSUSE Tumbleweed 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

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