Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessUpload crafted EPS to image endpoint
-
DeliveryBackend calls Image.open() on file
-
ExploitEPS parser reads negative BeginBinary bytecount
-
ExecutionParser seeks backward, loops forever
-
ImpactWorker CPU exhausted, service hangs (DoS)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
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 | The target application must accept attacker-influenced EPS input and pass it to Pillow's Image.open() (or otherwise invoke EpsImagePlugin), running an affected version 12.0.0-12.2.0. The specific trigger is a crafted EPS file containing a %%BeginBinary directive with a negative byte count, which drives the parser to seek backwards and re-read the same directive endlessly. Limiting factors: exploitation is impossible if the deployment never handles EPS files or if image parsing is constrained to a non-EPS format allowlist; there is no authentication or user-interaction requirement beyond delivering the file, and impact is limited to availability (a hang/CPU exhaustion), not code execution or data disclosure. |
| 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) is internally consistent for an availability-only DoS: no confidentiality or integrity impact, low complexity, and no privileges or interaction beyond getting the target to parse the file. The real-world network reachability depends on whether the deploying application actually accepts and opens EPS input - many deployments never enable or expose EPS parsing, which meaningfully narrows exposure below what AV:N alone implies. No EPSS score, SSVC decision, or KEV entry was provided; absence of KEV and of a weaponized exploit suggests this is not under active exploitation. This is a legitimate availability priority for services that ingest untrusted images (single-request hang of a worker/thread), but it is not a code-execution or data-exposure issue, so it should be triaged as a moderate DoS-hardening fix rather than an emergency. |
| Exploit ScenarioDerived | An attacker uploads a crafted EPS file (or supplies one via a URL the service fetches) to any endpoint that thumbnails or converts images with Pillow. When the backend calls Image.open() on the file, the EPS parser enters an infinite loop and the worker process pegs a CPU core and never returns, so repeated submissions exhaust the worker pool and take the service offline. The fix PR contains a test reproducer showing the exact trigger (a '-1' byte count), so the trigger condition is publicly documented. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Jul 14, 2026
Denial of service in Python Pillow 12.0.0 through 12.2.0 lets a remote attacker hang an application by supplying a crafted EPS image whose %%BeginBinary directive declares a negative byte count, causing the EPS parser to seek backwards and re-parse the same directive forever. Any service that calls Image.open() on attacker-supplied EPS data is affected until upgraded to 12.3.0. No public exploit identified at time of analysis, though the upstream fix PR includes a test reproducer; the flaw is not listed in CISA KEV.
Earlier versions of this analysis (1)
Pillow's EPS image parser in versions 12.0.0 through 12.2.0 enters an infinite loop when processing a crafted EPS file with a negative byte count in the %%BeginBinary directive, enabling remote unauthenticated denial of service against any application that calls Image.open() on untrusted EPS input. The CVSS vector (AV:N/AC:L/PR:N/UI:N) confirms the attack requires no privileges and no user interaction, making it exploitable by any attacker who can supply a malicious file to an affected service. No active exploitation has been identified (not in CISA KEV) and no public exploit code is known at time of analysis; a vendor-released patch in version 12.3.0 resolves the issue.
RemediationAI
Vendor-released patch: upgrade to Pillow 12.3.0 (pip install --upgrade 'Pillow>=12.3.0'), which adds validation rejecting a negative %%BeginBinary bytecount; see GHSA-pg7v-jwj7-p798 and the 12.3.0 release notes at https://github.com/python-pillow/Pillow/releases/tag/12.3.0. Where an immediate upgrade is not possible, the most effective compensating control is to stop parsing untrusted EPS: reject EPS uploads at the application layer or restrict Image.open() to an explicit allowlist of expected formats (e.g. pass formats=['PNG','JPEG'] so EPS is never dispatched to the vulnerable plugin), which removes the attack surface at the cost of losing EPS support. If EPS must be processed, run the parsing in a sandboxed worker with a hard wall-clock timeout and per-request CPU limits so an infinite loop kills only that isolated job rather than the main service; the trade-off is added operational complexity and latency.
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
Pillow is the de facto Python imaging library (fork of PIL) used for decoding and processing images across web backends, thumbnailing pipelines, and data-science tooling. The defect lives in PIL/EpsImagePlugin.py, which parses Encapsulated PostScript (EPS) DSC comments. When it encounters a %%BeginBinary directive it reads a declared byte count and uses it to advance through the binary section; because the value was never validated as non-negative, a negative count causes the file pointer to seek backwards to the same directive, which is then parsed again indefinitely. This maps to CWE-835 (Loop with Unreachable Exit Condition, i.e. an infinite loop). The affected CPE is cpe:2.3:a:python-pillow:pillow, and the fix (commit 03992618, PR #9708) adds an explicit check that raises ValueError 'BeginBinary bytecount cannot be negative'.
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 EPS reaches the parser over the network with no auth or interaction (AV:N/AC:L/PR:N/UI:N); impact is an availability-only hang, so C:N/I:N/A:H.
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from Vendor (GitHub_M).
CVSS VectorNVD
Lifecycle Timeline
4DescriptionNVD
Pillow is a Python imaging library. From 12.0.0 through 12.2.0, Pillow's EPS parser in PIL/EpsImagePlugin.py accepts a negative byte count in the %%BeginBinary directive, allowing a crafted EPS file to cause Image.open() to seek backwards to the same directive and parse it repeatedly in an infinite loop. This issue is fixed in version 12.3.0.
Articles & Coverage 1
Executive ViewAI
Python Pillow versions 12.0.0 through 12.2.0 contain a denial-of-service vulnerability enabling remote attackers to crash applications that process EPS image files. This affects web services, document handling platforms, and any backend processing user-supplied images, creating availability risks until systems are upgraded to version 12.3.0.
Apply vendor patch (Pillow 12.3.0). Interim mitigation: disable EPS image processing or restrict image uploads to safe formats (JPEG, PNG) in affected services until patching is complete.
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
Uncontrolled memory consumption in Python Pillow (PIL) versions 5.1.0 through 12.2.x allows a remote attacker to cause d
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
Same technique Denial Of Service
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Desktop 15 SP7 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Server 16.1 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Not-Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Not-Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Module for Python 3 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Not-Affected |
| SUSE Manager Proxy 4.3 | Not-Affected |
| SUSE Manager Retail Branch Server 4.3 | Not-Affected |
| SUSE Manager Server 4.3 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Not-Affected |
| openSUSE Leap 15.3 | Not-Affected |
| openSUSE Leap 15.4 | Not-Affected |
| openSUSE Leap 15.5 | Not-Affected |
| openSUSE Leap 15.6 | Not-Affected |
EUVD-2026-43741
GHSA-pg7v-jwj7-p798
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB