Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit input driving mode-1 image
-
DeliveryApp saves TGA with tga_rle compression
-
ExploitEncoder overreads packed row buffer
-
ExecutionAdjacent heap bytes written into output file
-
ImpactRetrieve TGA and extract leaked memory
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection 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 host application to save an image in Pillow's 1-bit mode '1' using the TGA format with run-length encoding enabled (compression='tga_rle') on an affected version (5.2.0 through 12.2.x), and the attacker must be able to obtain the resulting TGA file. It does NOT trigger on other image modes, on uncompressed TGA saves, or on formats other than TGA-with-RLE, and the attacker cannot choose which heap bytes leak - only a bounded run of adjacent process memory is exposed. The key limiting factor is that the vulnerable save configuration is uncommon and typically controlled by the application, not the attacker, so despite the PR:N/AC:L CVSS metrics this is not exploitable against a default deployment unless the app specifically performs mode-1 tga_rle encoding on attacker-reachable data. |
| Impact | Signals conflict and should be read carefully. The published CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/C:H) yields 7.5 and implies trivial remote confidentiality loss, but the description makes clear exploitation requires an application to save a mode '1' image with TGA RLE compression - an operation an attacker rarely controls directly, so real-world attack complexity is higher than AC:L suggests and the network vector is indirect at best. There is no KEV listing and no EPSS score supplied, and the only public code is the vendor fix itself (a PR/commit), not a weaponized exploit, so this is 'no public exploit identified at time of analysis.' The leaked data is a bounded amount of adjacent heap, not attacker-chosen memory, so confidentiality impact is realistically limited (I judge C:L, not C:H). Net: a legitimate memory-disclosure bug worth patching, but a low-urgency issue rather than an emergency - closer to high-CVSS-but-modest-real-risk unless an application both auto-produces mode-1 tga_rle output and exposes it to an attacker. |
| Exploit ScenarioDerived | An application uses Pillow to convert user-uploaded or generated 1-bit bitmaps to compressed TGA (compression='tga_rle') and then returns the resulting file to the requester. Because the RLE encoder overreads the packed row buffer, the returned TGA contains stray bytes of the server process's heap, which an attacker can harvest across many requests to reconstruct fragments of secrets. No public exploit or POC is known; only the vendor fix diff is available. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Jul 14, 2026
Out-of-bounds heap read in Python Pillow's TGA RLE encoder (versions 5.2.0 through 12.2.x) lets adjacent process heap bytes leak into a generated TGA file when an application saves a mode '1' (1-bit) image using compression='tga_rle'. The flaw is an information-disclosure bug (CWE-125), fixed in 12.3.0, with no public exploit identified at time of analysis. The NVD CVSS of 7.5 (network vector) overstates practical reach because triggering the leak depends on the host application invoking this specific and unusual save path.
Earlier versions of this analysis (1)
Pillow's TGA RLE encoder (versions 5.2.0 through 12.3.0) performs an out-of-bounds heap read when saving a mode 1 (1-bit monochrome) image with TGA RLE compression, copying adjacent process heap bytes directly into the output TGA file and enabling memory disclosure. Applications that accept untrusted image inputs, convert them to mode 1, and write TGA RLE output expose sensitive in-process heap content - such as session tokens or cryptographic material - to any party that can retrieve the output file. No public exploit code has been identified at time of analysis, and this issue is not listed in CISA KEV; the High attack complexity in the CVSS vector reflects that this non-default code path significantly constrains real-world exploitability.
RemediationAI
Vendor-released patch: upgrade to Pillow 12.3.0 or later (pip install --upgrade Pillow>=12.3.0), which resolves the leak by rejecting mode '1' images with TGA RLE compression rather than encoding them. If you cannot upgrade immediately, the concrete compensating control is to avoid the vulnerable code path entirely: do not call im.save(..., compression='tga_rle') on 1-bit ('1' mode) images - either save such images without RLE compression (compression=None, producing uncompressed TGA at the cost of larger files) or convert them to a supported mode (e.g. im.convert('L') or 'P') before RLE-saving. Applications that let untrusted input drive image mode/format/compression should validate and constrain those parameters. Reference the advisory GHSA-fj7v-r99m-22gq, PR https://github.com/python-pillow/Pillow/pull/9709, and commit eada3cbd7fb9963ee90673fb7b5270124a0d5f4b.
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 (python-pillow, CPE cpe:2.3:a:python-pillow:pillow) is one of the most widely used Python imaging libraries. The defect lives in TgaImagePlugin.py's RLE (run-length encoding) save routine: when encoding a 1-bit ('1' mode) image, the encoder reads past the end of its packed row buffer, so uninitialized/adjacent heap memory is copied into the RLE-compressed pixel data written to the output TGA file. This is a classic CWE-125 out-of-bounds read at the buffer boundary; the root cause is that the RLE packer's byte-per-pixel assumptions do not hold for the tightly packed 1-bit row representation. The upstream fix (PR #9709, commit eada3cbd) does not repair the packer but instead outright rejects the unsupported combination, raising OSError 'cannot write mode 1 as TGA with run-length encoding'.
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:H/I:N/A:N
AC:H because exploitation needs the app to save a mode-1 image with tga_rle and expose the output; C:L as only a bounded run of adjacent, non-attacker-chosen heap leaks; no integrity or availability impact.
AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Primary rating from Vendor (GitHub_M).
CVSS VectorNVD
Lifecycle Timeline
4DescriptionNVD
Pillow is a Python imaging library. From 5.2.0 until 12.3.0, Pillow's TGA RLE encoder reads past its packed row buffer when saving a mode 1 image with TGA RLE compression, allowing adjacent process heap bytes to be copied into the generated TGA file. This issue is fixed in version 12.3.0.
Blast Radius
ecosystem impact- 21 pypi packages depend on pillow (21 direct, 0 indirect)
Ecosystem-wide dependent count for version 5.2.0.
Articles & Coverage 1
Executive ViewAI
Python Pillow image processing library versions 5.2.0 through 12.2.x contain a memory-disclosure vulnerability in the TGA file encoder that can leak sensitive heap data when processing specific image formats, potentially exposing confidential information for any organization using Pillow to generate or transform images. This affects web applications, image processing services, and any infrastructure handling image operations.
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.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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-125 – Out-of-bounds Read
View allSame technique Buffer Overflow
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Fixed |
| openSUSE Tumbleweed | 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-43752
GHSA-fj7v-r99m-22gq
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB