Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessUpload zero-size image to app
-
ExploitApp invokes rank/median/min/max filter
-
ExecutionImagingExpand reads empty input storage
-
ImpactNative null dereference crashes process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Null pointer safety, defensive checks
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 | Requires that the target application apply a Pillow rank-based filter - ImageFilter.RankFilter, MedianFilter, MinFilter, or MaxFilter - to an image whose width or height is zero (sizes (0,1), (1,0), or (0,0) per the regression test). The attacker must be able to supply or cause creation of such a zero-size image reaching that filter call. Limiting factors: the application must actually use one of these specific rank filters (not a universal Pillow usage pattern), and the input path must allow a zero-dimension image to reach it - this is why the official CVSS 4.0 vector sets AT:P (attack requirements present) rather than treating it as unconditional. No authentication is indicated by the vector (PR:N), and no user interaction is required (UI:N), but impact is limited to a process crash (availability only). |
| Impact | This is a denial-of-service null pointer dereference (CWE-476) in the Pillow imaging library prior to 13.0.0. All signals point to availability-only impact: the provided CVSS 4.0 vector (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H) assesses only VA:H with no confidentiality or integrity impact, and CWE-476 plus the description ('native process crash') confirm a crash-only outcome rather than code execution. The score of 8.2 is driven by network reachability and high availability impact, but note the AT:P (Attack Requirements: Present) flag - exploitation is NOT unconditional; it depends on the target application actually applying a rank/median/min/max filter to an attacker-influenced image and on a zero-size image reaching that code path. No EPSS score, CISA KEV listing, or public exploit was provided in the input, so there is no evidence of active or at-scale exploitation. The GitHub source evidence provided is the upstream fix commit and a regression test - NOT a weaponized proof-of-concept. Bottom line: a credible, low-complexity DoS in an extremely popular library, but its real-world priority is moderated by the required application-side filter usage and the lack of confidentiality/integrity impact. Treat as a patch-in-normal-cycle availability bug rather than an emergency, unless the affected application exposes rank-filter processing to untrusted image input. |
| Exploit ScenarioDerived | A web or batch application uses Pillow to process user-uploaded images and applies a rank-based filter (RankFilter, MedianFilter, MinFilter, or MaxFilter) as part of its pipeline. An attacker uploads or triggers creation of a zero-size image (width or height of 0); ImagingExpand() allocates output and then faults reading the first pixel from empty input storage, crashing the native process. No public exploit code was identified in the provided data, though the trigger is trivial to construct. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Denial of service in Pillow prior to 13.0.0 occurs when ImageFilter.RankFilter, MedianFilter, MinFilter, or MaxFilter is applied to a zero-width or zero-height image, triggering a native null pointer dereference during edge expansion and crashing the process. Remote, unauthenticated attackers who can supply or cause creation of such a zero-dimension image to an application that uses these rank filters can cause high availability impact only (C:N/I:N/A:H per the assessed CVSS 3.1 vector; official CVSS 4.0 score 8.2 with AT:P). No public exploit code or confirmed active exploitation is identified at time of analysis, and no EPSS data was provided.
RemediationAI
Upgrade to Pillow 13.0.0 or later, which contains the vendor fix in ImagingExpand() for zero-dimension inputs (commit 443e3130a8c11594fd0e296afad497e11e678961; release https://github.com/python-pillow/Pillow/releases/tag/13.0.0; advisory https://github.com/python-pillow/Pillow/security/advisories/GHSA-27h8-gf7j-v5hc). If immediate upgrade is not possible, validate image dimensions before calling ImageFilter.RankFilter, MedianFilter, MinFilter, or MaxFilter and reject or skip images with width or height equal to zero; this prevents the crash but may change behavior for legitimate zero-size images. For untrusted image processing, run Pillow operations in an isolated subprocess or worker with restart and resource limits so a native crash cannot take down the main service, at the cost of added complexity and per-image overhead.
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 (PIL fork) is a Python imaging library whose C-level libImaging routines implement filters such as RankFilter, MedianFilter, MinFilter, and MaxFilter. The affected CPE cpe:2.3:a:python-pillow:pillow:*:*:*:*:*:*:*:* covers releases before 13.0.0. The root cause is CWE-476: a null pointer dereference in ImagingExpand() in src/libImaging/Filter.c; for an input with xsize or ysize equal to 0, the function allocates a non-empty output and then replicates edges by reading the first pixel from empty input storage, faulting before ImagingRankFilter is reached. The upstream commit 443e3130a8c11594fd0e296afad497e11e678961 adds an early return for zero-dimension inputs and regression tests for sizes (0,1), (1,0), and (0,0).
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
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Network-reachable attacker-controlled image triggers the crash without auth or interaction (PR:N/UI:N), low complexity once the app uses a rank filter; impact is crash-only, so 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. Prior to 13.0.0, Pillow's rank-based filters can dereference invalid image storage for a zero-size image. ImagingExpand() allocates a non-empty output and then faults while replicating edges by reading the first pixel from empty input storage; ImagingRankFilter is never reached. An attacker can supply or cause creation of a zero-size image to an application that applies a rank, median, minimum, or maximum filter. This causes a native process crash. This issue is fixed in version 13.0.0.
Blast Radius
ecosystem impact- 89,616 pypi packages depend on pillow (20,283 direct, 70,825 indirect)
Ecosystem-wide dependent count for version 13.0.0.
Technical POC Analysis
CWE-476 (NULL Pointer Dereference) in ImagingExpand() at src/libImaging/Filter.c (faulting read at line 79, observed under gdb at line 105 in the EXPAND(UINT8, image8) expansion).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Pillow, a widely used Python image-processing library, has a high-severity denial-of-service flaw that can crash applications when rank filters are applied to zero-dimension images. The issue affects services that accept or generate images and use those filters, creating a potential availability risk for customer-facing and internal systems. Leadership should prioritize inventory and mitigation because the vulnerability can be triggered by crafted image inputs, although no public exploit code or active exploitation has been identified at time of analysis.
No vendor-released patch identified at time of analysis. Interim mitigations: validate and reject zero-width or zero-height images before filter calls; enforce image dimension and resource limits; isolate image-processing processes to contain crashes; monitor for abnormal process termination; and track the vendor advisory for Pillow 13.0.0.
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 null pointer dereference occurs when a program attempts to access memory through a pointer that has been set to NULL (address 0x0).
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 versions 11.0.0 through 12.x (fixed in 13.0.0) can reuse a stale native ImagingCore buffer when a multi-frame ima
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
EUVD-2026-104639
GHSA-27h8-gf7j-v5hc
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB