Skip to main content

Python Pillow EUVDEUVD-2026-43753

| CVE-2026-59200 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-07-14 GitHub_M GHSA-jjj6-mw9f-p565
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
    Craft small PDF with oversized FlateDecode Length
  2. Delivery
    Submit PDF to Pillow-backed service
  3. Exploit
    PdfStream.decode() calls zlib.decompress unbounded
  4. Execution
    Stream inflates to gigabytes
  5. Impact
    Host memory exhausted, service denial

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

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

Exploitation Conditions

Exploitation requires that the target application actually parses attacker-controlled PDF data through Pillow's PdfParser (i.e., PDF handling is invoked on untrusted input) - the crafted FlateDecode stream must reach PdfStream.decode(). The affected Pillow version must be in the 5.1.0-12.2.x range. No authentication, privileges, or user interaction are required per the CVSS vector (PR:N/UI:N) in a server-side auto-processing context; the key limiting factor is deployment-dependent: if PDFs are only opened from trusted sources, or the application never routes user input into the PDF code path, the vulnerability is not reachable. Success also depends on the host lacking memory limits/sandboxing that would contain the runaway allocation.

Impact

The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, 7.5 High) reflects a pure availability impact - no confidentiality or integrity loss - reachable without authentication or privileges and with low complexity. That network/no-auth framing is realistic only where an application feeds untrusted PDFs into Pillow (e.g., a web service that renders or thumbnails uploaded PDFs); a desktop or batch tool would effectively require a user to open a malicious file, shifting closer to UI-assisted local delivery. No EPSS score, SSVC decision, or KEV entry was provided; absence of KEV plus no observed public exploit suggests this is not currently subject to mass exploitation. The realistic priority is moderate: it is a memory-exhaustion DoS, not code execution, so impact is service disruption rather than compromise. Teams running multi-tenant or internet-facing services that process user-supplied PDFs with Pillow should treat it as a genuine availability risk; environments that only handle trusted images are low priority. Note the tension between AV:N and the practical need for the application to actually route attacker PDFs into the parser - verify your deployment's exposure before ranking it as network-remote.

Exploit ScenarioDerived

An attacker uploads a small (a few kilobytes) PDF containing a FlateDecode stream with a large declared Length to a web service that uses Pillow to render or thumbnail PDFs. When the server calls PdfStream.decode(), zlib inflates the stream into multiple gigabytes, exhausting RAM and causing the worker or host to crash or hang. No public exploit is published, but crafting the malicious PDF is trivial given the disclosed root cause and the test case in the fix PR.

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

Uncontrolled memory consumption in Python Pillow (PIL) versions 5.1.0 through 12.2.x allows a remote attacker to cause denial of service by supplying a small crafted PDF whose FlateDecode stream declares a large Length; PdfParser.PdfStream.decode() passes this attacker-controlled Length straight to zlib.decompress() as the bufsize with no upper bound, so a tiny file inflates into gigabytes of decompressed data and exhausts host memory. Fixed in 12.3.0 by streaming decompression with a bounded max_length. No public exploit identified at time of analysis and this CVE is not in CISA KEV, but the trigger is trivial to construct.

RemediationAI

Vendor-released patch: 12.3.0 - upgrade Pillow to 12.3.0 or later (pip install --upgrade 'Pillow>=12.3.0'), which bounds decompression via a max_length ceiling and rejects oversized streams with a ValueError. Where immediate upgrade is not possible, the primary compensating control is to stop passing untrusted PDFs into Pillow's PdfParser: gate PDF ingestion behind strict input-size and resource limits, run the parsing worker under a hard memory cgroup / ulimit (RLIMIT_AS) or in an isolated sandbox/subprocess so an OOM kills only the worker rather than the host, and enforce per-request timeouts. If PDF support is not required, disable or reject PDF inputs entirely at the application layer. These controls limit blast radius but do not fix the underlying unbounded allocation, so upgrading remains the correct fix. See the advisory GHSA-jjj6-mw9f-p565, fix PR https://github.com/python-pillow/Pillow/pull/9718, and commit https://github.com/python-pillow/Pillow/commit/f7a31ea75e460e108c37126da1f47812f21f6b09.

Affected VersionsENISA

Pillow 5.1.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 flaw lives in src/PIL/PdfParser.py, part of Pillow's PDF handling code path used when opening or parsing PDF documents. The vulnerable decode() method read the DL (Decoded Length) or Length field directly from the untrusted PDF dictionary and passed it as the bufsize argument to zlib.decompress(). Because bufsize is only an initial buffer hint and zlib will grow it as needed, and because the code never compared the actual output size against any safe ceiling, a FlateDecode (zlib/DEFLATE) compressed stream could expand at ratios far exceeding 1000:1 - a classic decompression bomb. This is the essence of CWE-400 (Uncontrolled Resource Consumption): a resource allocation driven by attacker-supplied size metadata with no bound. The CPE cpe:2.3:a:python-pillow:pillow:*:*:*:*:*:*:*:* confirms the affected component is the python-pillow/pillow package itself across all sub-versions in range. The fix replaces the one-shot decompress with zlib.decompressobj().decompress(self.buf, max_length) defaulting to ImageFile.SAFEBLOCK, raising ValueError('Decompressed data too large') if unconsumed_tail remains.

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 7.5 HIGH

Untrusted PDF reaching a server-side parser needs no auth or interaction (AV:N/PR:N/UI:N/AC:L); impact is pure memory-exhaustion DoS so C:N/I:N/A:H, scope unchanged.

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
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 - 16:09 cve.org
HIGH 7.5

DescriptionCVE.org

Pillow is a Python imaging library. From 5.1.0 until 12.3.0, PdfParser.PdfStream.decode() in PIL/PdfParser.py calls zlib.decompress() with bufsize set to the PDF stream Length field without bounding the decompressed output size, allowing a crafted FlateDecode PDF stream to exhaust memory from a small file. 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
  • 21 pypi packages depend on pillow (15 direct, 6 indirect)

Ecosystem-wide dependent count for version 5.1.0.

Executive ViewAI

Why It Matters

Python Pillow, a critical image-processing library widely used in web and data applications, is vulnerable to remote denial of service through versions 12.2.x. Attackers can crash services with a single malformed PDF file, disrupting document processing, image uploads, and data pipelines. Immediate upgrade to version 12.3.0 is required to restore availability.

Business Impact: High
Compensating Controls

Apply vendor patch: Pillow 12.3.0 or later.

Threat Intelligence Overview

EPSS Score
0.4%
Top 73% exploitable
Prevalence
High
one of the most widely used Python imaging libraries across web and data stacks
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

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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-128067 HIGH POC
8.4 Nov 12

Heap buffer overflow in Pillow's libtiff-based TIFF encoder (all versions 2.3.0 through 12.3.0) lets attacker-controlled

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

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