Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted image to color-management endpoint
-
ExploitApp calls ImageCmsTransform.apply with mismatched output mode
-
ExecutionNative lcms2 transform writes past buffer bounds
-
ImpactHeap corruption crashes worker (DoS)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
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 ImageCms.ImageCmsTransform.apply(im, imOut) where the supplied output image imOut has a mode that does not match the transform's declared output_mode (and, in the unpatched code path, an input im whose mode differs from input_mode) - e.g., applying a transform whose output_mode is RGB while passing an RGBA or LAB output image, exactly as shown in the fix's regression tests (t.apply(hopper('RGBA')) and t.apply(hopper('LAB'), hopper('RGBA'))). This is NOT default remote-unauthenticated exploitation of every Pillow install: it is limited to code paths that call the ImageCms transform apply() API and that allow the image mode/geometry to diverge from the transform's declared modes, typically when modes are driven by untrusted image input. Applications that never use ImageCms color transforms, or that always pass correctly mode-matched buffers, are not exposed. |
| Impact | The NVD CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, score 7.5) rates this network, low-complexity, unauthenticated with high availability impact and no confidentiality/integrity impact - consistent with a crash/DoS classification. That vector should be treated cautiously: exploitation is not a raw wire-protocol flaw but requires an application to call ImageCms.ImageCmsTransform.apply() with a mode-mismatched output image, so 'network' reachability depends on the application deriving image modes from untrusted input; AC:L is optimistic given the specific mode-mismatch precondition. The description's phrase 'controlled native heap corruption' suggests impact could exceed pure availability (potential integrity/code-execution consequences), which the NVD C:N/I:N scoring does not capture - verify with vendor before assuming DoS-only. No EPSS score was provided in the input, so widespread-exploitation probability cannot be quantified. This is not in CISA KEV and no POC beyond the regression test in the fix commit is provided, so real-world priority is moderate: patch promptly given Pillow's massive deployment footprint, but there is no evidence of active exploitation. |
| Exploit ScenarioDerived | An application performs ICC color-management on user-uploaded images and passes a pre-allocated output image whose mode is influenced by attacker-controlled input to ImageCmsTransform.apply(); the mismatched buffer geometry triggers an out-of-bounds write in the native lcms2 transform, crashing the worker process (denial of service) and potentially corrupting adjacent heap structures. Given AV:N/AC:L in the NVD vector, a remote user could repeatedly submit crafted images to exhaust or crash the service. No public exploit code has been identified; only the regression test accompanying the fix demonstrates the mode-mismatch trigger. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 14, 2026
Denial-of-service and controlled heap corruption in Python's Pillow imaging library (all versions prior to 12.3.0) occurs when ImageCms.ImageCmsTransform.apply() is invoked with an output image whose mode does not match the transform's declared output mode, causing an out-of-bounds write in the native color-management code. The pre-fix code only validated the output mode and never validated the input mode, so a mismatched buffer geometry lets the C-level transform write past allocation bounds. No public exploit has been identified at time of analysis; the fix is confirmed in release 12.3.0 via the vendor security advisory GHSA-9hw9-ch79-4vh6.
RemediationAI
Vendor-released patch: upgrade Pillow to 12.3.0 or later (pip install --upgrade 'Pillow>=12.3.0'), which adds explicit input-mode and output-mode validation before the native transform runs; see the advisory at https://github.com/python-pillow/Pillow/security/advisories/GHSA-9hw9-ch79-4vh6. Where an immediate upgrade is not feasible, the actionable compensating control is in application code: before calling ImageCms.ImageCmsTransform.apply(), assert that im.mode equals the transform's input_mode and that any supplied imOut.mode equals the transform's output_mode, rejecting or converting mismatched images (im.convert()) rather than passing them through - this mirrors the upstream fix and has minimal side effects. Additionally, avoid deriving transform modes or output-image modes directly from untrusted/attacker-supplied image metadata, and constrain ICC color-management workflows to trusted inputs; the trade-off is that strict mode validation may reject legitimate images with unusual color modes, which callers should handle by explicit conversion.
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's ImageCms module wraps LittleCMS (lcms2) to perform ICC color-profile transforms between color spaces (e.g., RGB, RGBA, LAB, CMYK). Each ImageCmsTransform carries a declared input_mode and output_mode that determine the pixel-buffer layout (bytes-per-pixel and channel count) the native transform expects. The root cause is CWE-787 (Out-of-bounds Write): the vulnerable apply() path validated only that imOut.mode matched output_mode and failed to validate that im.mode matched input_mode, so when the caller supplied images whose mode/channel geometry differs from what the native transform was compiled for, lcms2 reads and writes buffers sized for the wrong mode, corrupting the native heap. The CPE cpe:2.3:a:python-pillow:pillow:*:*:*:*:*:*:*:* confirms the affected package is python-pillow across all versions below the fixed 12.3.0. The fix (PR #9715, commit a9ffc42) adds explicit 'mode mismatch' ValueError checks for both the input image mode and the output image mode before dispatching to the native apply().
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
Reachable remotely only when an app feeds untrusted modes into the ImageCms apply() path with a mode mismatch, so AC:H; impact is native heap corruption manifesting primarily as availability loss (A:H), with C/I unconfirmed.
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. Prior to 12.3.0, Pillow's ImageCms.ImageCmsTransform.apply(im, imOut) API can trigger controlled native heap corruption when the caller supplies an output image whose mode does not match the transform's declared output mode. This issue is fixed in version 12.3.0.
Blast Radius
ecosystem impact- 94,953 pypi packages depend on pillow (21,184 direct, 75,394 indirect)
Ecosystem-wide dependent count for version 12.3.0.
Articles & Coverage 1
Executive ViewAI
Python's Pillow library (versions before 12.3.0) is vulnerable to denial-of-service attacks that can disrupt image processing operations across web applications and data platforms. Given Pillow's widespread use in enterprise environments, affected organizations face risk of service interruptions and potential data handling issues. Rapid patching to version 12.3.0 is essential to protect business continuity for any organization processing images.
Apply vendor patch.
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.
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.
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 weakness CWE-787 – Out-of-bounds Write
View allSame technique Buffer Overflow
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | 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-43746
GHSA-9hw9-ch79-4vh6
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB