Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted large image to transform endpoint
-
DeliveryDrive oversized Image.transform() under memory pressure
-
ExploitOutput allocates but per-column lookup allocation fails
-
ExecutionError path double-frees image storage
-
ImpactProcess crash or memory corruption
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the application to invoke Image.transform() using the fast path - specifically Transform.EXTENT or a pure scale-and-translate Transform.AFFINE with the default NEAREST resampling filter - on an operation large enough that memory allocation is strained. The precise trigger is a selective allocation failure: the output image allocation must succeed while the additional per-column lookup allocation fails, so the host must be under genuine memory pressure for the vulnerable error path to execute. Limiting factors: the attacker must be able to influence transform size/parameters (typically via an image-upload or image-processing feature), reliable triggering depends on the non-deterministic memory-pressure window rather than a guaranteed condition, and only Pillow versions prior to 13.0.0 are affected. There is no authentication requirement in the supplied CVSS vector (PR:N) and no user interaction (UI:N). |
| Impact | The input CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) scores 8.7 (High) and is driven entirely by availability impact (VA:H) with no confidentiality or integrity impact - this is fundamentally a denial-of-service/memory-corruption bug, not a disclosure or code-execution flaw as confirmed. No EPSS score, KEV listing, or POC was provided, so the signal set is thin: no public exploit identified at time of analysis and no evidence of active exploitation. The AC:L/AT:N rating in the supplied vector conflicts with the description, which requires the attacker to 'drive such a large Image.transform() operation under memory pressure' such that the output allocation succeeds while the per-column lookup allocation selectively fails - this is a probabilistic, environment-dependent precondition, not a deterministic low-complexity trigger, so the real-world reliability is considerably lower than 8.7 implies. The description also hedges impact as 'may trigger', 'can crash', and 'may corrupt memory', meaning the worst-case (exploitable memory corruption → code execution) is unconfirmed and speculative; the confirmed outcome is a process crash. Net assessment: a genuine bug worth patching in exposed image-processing pipelines, but closer to a conditional DoS than a widely-weaponizable critical issue, and the raw high CVSS overstates priority absent exploit evidence. |
| Exploit ScenarioDerived | A web service that accepts user-supplied images and performs resize/transform operations (e.g. thumbnailing via Image.transform with EXTENT or scale-and-translate AFFINE under default NEAREST resampling) is targeted by an attacker who submits a very large transform request while the host is under memory pressure. If the output image allocation succeeds but the subsequent per-column lookup allocation fails, the error path double-frees image storage, crashing the worker process and potentially corrupting memory. No public exploit code is identified, and reliable triggering depends on inducing the specific allocation-failure window. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Memory corruption in Pillow versions prior to 13.0.0 can crash the process when Image.transform() takes the fast Transform.EXTENT or pure scale-and-translate Transform.AFFINE path with default NEAREST resampling and a selective allocation failure occurs under memory pressure. The defect is a double free/use-after-free in ImagingScaleAffine: the output image allocation succeeds, the additional per-column lookup allocation fails, and the error path deletes image storage that later cleanup releases again (CWE-416). The assessed impact is availability-only with no confidentiality or integrity effect, exploitation depends on attacker-influenced transform sizes plus genuine memory pressure, and no public exploit identified at time of analysis.
RemediationAI
Upgrade to Pillow 13.0.0 or later; this is the vendor-released patch and contains commit aafa6c75f7cdabb9f409a8aac7c780bea31d08d9, with details in advisory GHSA-7mwm-ghpf-9vrm (https://github.com/python-pillow/Pillow/security/advisories/GHSA-7mwm-ghpf-9vrm) and the 13.0.0 release notes (https://github.com/python-pillow/Pillow/releases/tag/13.0.0). If immediate upgrade is not possible, constrain attacker-controlled Image.transform() output dimensions and input image sizes so large allocations cannot be requested, reject or cap EXTENT and pure scale-and-translate AFFINE transforms above a safe size, and consider forcing a non-NEAREST resampling filter for untrusted transforms where feasible-accepting altered image quality and validating behavior, since this is a compensating control rather than a guaranteed fix. Run image processing under memory limits and process isolation so an allocation failure or double free produces a contained crash instead of broader host impact.
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 whose performance-critical operations are implemented in C extensions, including src/_imaging.c and libImaging/Geometry.c. The affected code is the ImagingScaleAffine fast path for Transform.EXTENT or pure scale-and-translate Transform.AFFINE operations using the default NEAREST resampling filter. CWE-416 (use-after-free) manifests here as a double free: when the output image allocation succeeds but the per-column lookup allocation fails, the error path releases image storage that is later released again during cleanup; the upstream fix removes the premature ImagingDelete(imOut) in Geometry.c and adds return-value handling in _resize so the caller deletes imOut on transform failure. The CPE cpe:2.3:a:python-pillow:pillow:*:*:*:*:*:*:*:* covers Pillow releases before 13.0.0. The supplied CVSS 4.0 vector scores 8.7 with AC:L and availability-only impact, while the independent CVSS 3.1 assessment rates AC:H because the trigger requires a non-deterministic selective allocation failure under memory pressure; both agree that confidentiality and integrity impacts are absent.
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:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Attacker-influenced transform is reachable over the network (AV:N, PR:N), but triggering the double free needs a specific memory-pressure allocation-failure window, so AC:H; impact is availability-only (A:H, C/I:N).
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 can double free image memory when ImagingScaleAffine encounters a selective allocation failure. The affected fast path handles Transform.EXTENT or pure scale-and-translate Transform.AFFINE operations with the default NEAREST resampling. The output image allocation must succeed while the additional per-column lookup allocation fails, after which the error path deletes image storage that later cleanup releases again. An attacker who can drive such a large Image.transform() operation under memory pressure may trigger the failure. This can crash the process and may corrupt memory. 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-416 (use-after-free, manifesting as a double free) in ImagingScaleAffine() at src/libImaging/Geometry.c:866 (advisory commit a707c6b21c313880d0771e54965d142dd42358b6).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A memory-corruption flaw (CVE-2026-112402) in the Pillow image-processing library can crash the Python process handling image transformations, so any service, API endpoint, or batch pipeline that resizes or crops untrusted images may become intermittently unavailable. Triggering it requires an attacker to influence image geometry at the same moment the host is under genuine memory pressure, so disruption is likely to be sporadic and hard to attribute rather than a clean, repeatable outage. There is no confidentiality or integrity exposure and no public exploit identified at time of analysis, but Pillow is embedded broadly across our image-handling estate, making this a resilience and availability risk rather than a data-breach risk.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) enforce maximum decoded image and transform output dimensions before Image.transform() executes; (2) run image processing in isolated worker processes or containers with memory limits and auto-restart so a double free only drops one worker; (3) avoid or gate the Transform.EXTENT and scale-and-translate Transform.AFFINE fast paths, or use a non-NEAREST resampling filter, for untrusted images; (4) monitor and throttle memory pressure on image-handling hosts and reject oversized image payloads at the edge.
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
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
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-104641
GHSA-7mwm-ghpf-9vrm
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB