Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker supplies nested list coordinate data
-
DeliveryApplication passes nested lists to ImageDraw API
-
ExploitRecursive unpacking exceeds buffer bounds
-
ExecutionHeap overflow occurs
-
ImpactMemory corruption/denial of service or arbitrary code execution achieved
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
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 | Exploitation requires that an application using vulnerable Pillow versions (11.2.1-12.1.x) accepts user-controlled coordinate data and passes it directly to coordinate-accepting APIs: ImagePath.Path(), ImageDraw.ImageDraw.polygon(), or ImageDraw.ImageDraw.line(). The attacker must be able to supply deeply nested list structures (e.g., lists containing lists containing coordinate pairs) as coordinate arguments. Default Pillow installations and standard API usage are vulnerable - no special configuration is required. The vulnerability is limited to local Python processes that handle untrusted image drawing requests; it cannot be exploited remotely unless the vulnerable code is exposed via a network service (web application, API server, etc.). Applications that validate and flatten coordinate data before passing to these APIs, or that only accept simple two-element tuples from trusted sources, are not vulnerable. |
| Impact | This vulnerability presents moderate-to-high real-world risk despite missing CVSS and EPSS data. The attack vector is local (applications must pass untrusted coordinate data to vulnerable APIs), which limits network-wide exploitation but poses significant risk in server environments processing user-supplied image drawing requests. No authentication is required - any code path that accepts user-controlled coordinate arguments is vulnerable. The heap buffer overflow could enable denial of service through crashes or, in theory, arbitrary code execution through heap corruption, though practical exploitation depends on heap layout and exploit mitigations. The vulnerability was introduced in a minor release (11.2.1) and affects a widely-used library, suggesting moderate adoption of vulnerable versions before the fix (12.2.0) was released. Lack of KEV status and public POC availability suggests limited active exploitation as of the analysis date, but the severity of heap overflows and simplicity of triggering conditions (nested lists are trivial to construct) warrant prompt patching. Organizations using Pillow for server-side image processing or web-based image manipulation should prioritize upgrades. |
| Exploit ScenarioDerived | An attacker controlling image drawing parameters in a web application (e.g., a service that generates custom images via user input) crafts a request with deeply nested coordinate lists such as '[[[1, 2]]]' or similar structures. When passed to ImageDraw.polygon() or ImageDraw.line(), the recursive unpacking logic exhausts the allocated buffer, causing a heap overflow. This either crashes the application (denial of service) or corrupts heap structures, potentially leading to code execution if the attacker can control heap layout and overwrite function pointers or other critical data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 04, 2026
Heap buffer overflow in Pillow 11.2.1 through 12.1.x allows local attackers to cause denial of service or potentially execute arbitrary code by passing deeply nested list structures as coordinates to ImagePath.Path, ImageDraw.polygon, or ImageDraw.line APIs, which recursively unpack coordinates beyond allocated buffer boundaries.
RemediationAI
Upgrade Pillow to version 12.2.0 or later immediately via 'pip install --upgrade pillow>=12.2.0'. If immediate upgrade is not feasible, apply input validation at the application layer by sanitizing coordinate data before passing to ImagePath.Path, ImageDraw.polygon, or ImageDraw.line: validate that each coordinate is a two-element tuple or list containing only numeric values, and reject any nested list structures. This workaround has minimal performance impact but requires code changes in all calling code paths. Refer to the official advisory at https://github.com/python-pillow/Pillow/security/advisories/GHSA-5xmw-vc9v-4wf2 for additional technical details and verification steps.
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 a Python imaging library that provides APIs for drawing operations on images. The vulnerability exists in coordinate handling for drawing primitives (polygon, line) and path operations. When processing coordinate arguments, the code failed to validate that coordinate pairs were properly formed two-element numeric tuples; instead, it recursively unpacked nested list structures without bounds checking. This classic heap buffer overflow (CWE-122: Stack-based Buffer Overflow / Heap-based) occurs because the unpacking logic did not account for the depth of nesting and continued writing beyond the pre-allocated buffer. The affected CPE is pip/pillow, a Python package distributed via PyPI.
Know when the next one hits your stack
- 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
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Primary rating from Vendor (https://github.com/python-pillow/Pillow).
CVSS VectorVendor: https://github.com/python-pillow/Pillow
DescriptionCVE.org
Passing nested lists as coordinates to APIs that accept coordinates such as ImagePath.Path, ImageDraw.ImageDraw.polygon and ImageDraw.ImageDraw.line could cause a heap buffer overflow, as nested lists were recursively unpacked beyond the allocated buffer. Coordinate lists are now validated to contain exactly two numeric coordinates. This was introduced in Pillow 11.2.1.
Blast Radius
ecosystem impact- 189 pypi packages depend on pillow (157 direct, 32 indirect)
Ecosystem-wide dependent count for version 11.2.1.
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
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.
A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.
Same weakness CWE-122 – Heap-based Buffer Overflow
View allSame technique Buffer Overflow
View allVendor StatusVendor
SUSE
Severity: Medium| Product | Status |
|---|---|
| SUSE Linux Enterprise Desktop 15 SP7 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | Fixed |
| SUSE Linux Enterprise Server 15 SP7 | Fixed |
| SUSE Linux Enterprise Server 16.0 | Fixed |
| SUSE Linux Enterprise Server 16.1 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Fixed |
| openSUSE Leap 16.0 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP4 | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP5 | Fixed |
| SUSE Linux Enterprise Module for Python 3 15 SP6 | Fixed |
| SUSE Linux Enterprise Server 15 SP4 | Fixed |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP5 | Fixed |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP6 | Fixed |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Fixed |
| SUSE Manager Proxy 4.3 | Fixed |
| SUSE Manager Retail Branch Server 4.3 | Fixed |
| SUSE Manager Server 4.3 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP4 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP5 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP6 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Fixed |
| openSUSE Leap 15.3 | Fixed |
| openSUSE Leap 15.4 | Fixed |
| openSUSE Leap 15.5 | Fixed |
| openSUSE Leap 15.6 | Fixed |
EUVD-2026-28901
GHSA-5xmw-vc9v-4wf2
NVD
CVE.org
EPSS
VulDB
Exploit-DB