Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft small PDF with oversized FlateDecode Length
-
DeliverySubmit PDF to Pillow-backed service
-
ExploitPdfStream.decode() calls zlib.decompress unbounded
-
ExecutionStream inflates to gigabytes
-
ImpactHost 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
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.
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.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.
Articles & Coverage 1
Executive ViewAI
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.
Apply vendor patch: Pillow 12.3.0 or later.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files. Rated
Denial of service in Python Pillow (versions 8.2.0 through 12.2.0) allows remote attackers to exhaust memory during JPEG
Out-of-bounds memory disclosure in Python Pillow before 12.3.0 lets an attacker who supplies a crafted McIdas AREA image
Heap out-of-bounds write in Python Pillow prior to 12.3.0 lets an attacker who controls the rank-filter size parameter c
The package pillow 5.2.0 and before 8.3.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the getrgb
Pillow is a Python imaging library. In versions 11.2.0 to before 11.3.0, there is a heap buffer overflow when writing a
Integer overflow in the ImagingResampleHorizontal function in libImaging/Resample.c in Pillow before 3.1.1 allows remote
Python Image Library (PIL) 1.1.7 and earlier and Pillow 2.3 might allow remote attackers to execute arbitrary commands v
Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters
An issue was discovered in Pillow before 8.1.1. Rated critical severity (CVSS 9.8), this vulnerability is remotely explo
libImaging/PcxDecode.c in Pillow before 6.2.2 has a PCX P mode buffer overflow. Rated critical severity (CVSS 9.8), this
libImaging/SgiRleDecode.c in Pillow before 6.2.2 has an SGI buffer overflow. Rated critical severity (CVSS 9.8), this vu
Same weakness CWE-400 – Uncontrolled Resource Consumption
View allSame technique Denial Of Service
View allVendor 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 |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP4 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP4 | Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP5 | Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Affected |
| SUSE Linux Enterprise Server 15 SP6 | Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Affected |
| SUSE Manager Proxy 4.3 | Affected |
| SUSE Manager Retail Branch Server 4.3 | Affected |
| SUSE Manager Server 4.3 | Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Affected |
| openSUSE Leap 15.3 | Affected |
| openSUSE Leap 15.4 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-43753
GHSA-jjj6-mw9f-p565
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB