Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessUpload crafted tiled TIFF to image-processing app
-
DeliveryPillow invokes libtiff tiled-TIFF decode path
-
ExploitUndersized tile buffer triggers over-read in _decodeTile copy loop
-
ExecutionAdjacent heap bytes copied into pixels or process crash
-
ImpactHeap data disclosure or denial of service
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 | The target application must load and decode an attacker-supplied TIFF via Pillow (versions 8.2.0 through 12.x; fixed in 13.0.0), and the file must use the tiled-TIFF decode path handled by _decodeTile. The specific trigger is a TIFF where libtiff returns a tile allocation smaller than row_stride × tile_length - in practice produced by conflicting/duplicated tags (e.g. duplicated BitsPerSample or PhotometricInterpretation, or a multi-value PhotometricInterpretation) that make Pillow's chosen unpacker consume more bytes per row (4-byte RGBX/RGBA, 6-byte RGB;16N) than libtiff actually decoded. Limiting factors: exploitation requires the app to accept and process untrusted TIFF input, impact is bounded to adjacent-heap disclosure (C:L) or a process crash (A:L) with no write/integrity primitive, and upgrading to Pillow 13.0.0 fully remediates by rejecting such images with 'decoder error -2'. |
| Impact | This is a genuine but moderate-severity issue, best triaged as medium priority rather than an emergency. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L, base 6.5) indicates a network-reachable, low-complexity, unauthenticated flaw, but impact is deliberately scoped low: C:L reflects a partial heap information leak into returned pixels, I:N (no integrity impact - it is a read overflow, not a write primitive per CWE-122's heap classification; see confidence notes), and A:L reflects a possible process crash (DoS). No EPSS score was provided in the input, so exploitation probability cannot be quantified. The CVE is NOT in CISA KEV and there is no evidence of active exploitation. The fix commit does publish crafted TIFF test vectors that deterministically trigger the condition, which materially lowers the barrier to building a reproducer. No SSVC decision data was supplied. Weighing these signals: this is a real, easily-triggered bug in a very widely used library, but its practical ceiling is heap data disclosure and DoS rather than code execution, so it should be patched promptly where untrusted TIFFs are processed but does not rise to drop-everything criticality. |
| Exploit ScenarioDerived | An attacker uploads a crafted tiled TIFF (for example with duplicated BitsPerSample/PhotometricInterpretation tags so Pillow's unpacker reads more bytes per pixel than libtiff decoded) to a web service, thumbnailing pipeline, or document processor that opens images with Pillow. When the application calls Image.open().load(), the stride-and-copy loop in _decodeTile walks past the undersized tile allocation, copying adjacent heap bytes into the output pixels (information disclosure) or crashing the worker (DoS). Crafted trigger samples are publicly available in the official fix commit, lowering the bar for reproduction. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Heap out-of-bounds read in Pillow's tiled-TIFF decoder (versions 8.2.0 through 12.x) lets a crafted TIFF file cause the stride-and-copy loop in _decodeTile to walk past the buffer libtiff allocated, potentially exposing adjacent heap contents in the returned pixel data or crashing the process. Any application that opens untrusted TIFF images with an affected Pillow build is exposed without authentication or user interaction (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L, 6.5), though impact is bounded to partial confidentiality loss and partial availability loss with no write primitive. No public exploit code and no confirmed active exploitation were identified at time of analysis; the vendor fix in 13.0.0 makes the decoder reject the triggering images with 'decoder error -2'.
RemediationAI
Upgrade Pillow to 13.0.0 or later, which is the vendor-released patch for this issue; the fix commit (https://github.com/python-pillow/Pillow/commit/76869efdbbf2ad7dccd7536520fb61b7a00ab61e) adds the row-size and bits-per-pixel validation that rejects malformed tiles, and the advisory is at https://github.com/python-pillow/Pillow/security/advisories/GHSA-462x-pgg6-55fp. Because Pillow is frequently a transitive dependency, verify the resolved version in each virtualenv and pin or build from a constraint file so that 13.0.0+ actually lands - side effect: 13.0.0 is a major release, so run the test suite for image-handling regressions and confirm that previously accepted (malformed) TIFFs now raise OSError 'decoder error -2'. If upgrading must be deferred, the practical compensating controls are to reject TIFF at the input boundary (allowlist JPEG/PNG instead) at the cost of workflow changes, or to convert/validate untrusted TIFFs with an external tool such as libtiff's tiffinfo before they reach Pillow, which adds a processing step. There is no configuration flag that disables the tiled or TIFF decoder specifically, so runtime isolation is the fallback: decode untrusted images in a sandboxed or memory-limited subprocess so a crash or heap disclosure is contained, accepting the added latency of process isolation.
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 delegates TIFF parsing to libtiff and converts decoded tiles through libImaging's codec state machine in src/libImaging/TiffDecode.c. In _decodeTile, Pillow compares the tile allocation size returned by libtiff against a row size derived from state->bits and the plane count, then copies pixels row by row. When a TIFF carries conflicting or duplicated tags - for example a multi-value PhotometricInterpretation, or duplicated BitsPerSample/SamplesPerPixel where libtiff honors the first value and Pillow's tag cache honors the last - the two libraries disagree on bytes per pixel. libtiff then allocates and decodes a narrow tile (1 byte/pixel greyscale or 8-bit YCbCr) while Pillow selects a wide unpacker (4 bytes/pixel RGBX/RGBA, or 6 bytes/pixel RGB;16N), so the required unpacker row stride exceeds the row byte size libtiff produced and the copy loop reads beyond the allocation. The class is CWE-122 (heap-based buffer overflow), realized here as an out-of-bounds read rather than a write: the leaked memory is surfaced as pixel data, and sufficiently large overruns fault the process. The upstream fix (commit 76869efd) adds two guards - _decodeAsRGBA rejects any state->bits other than 32, and _decodeTile computes an explicit unpacker_row_byte_size and refuses the image when it is larger than row_byte_size - turning both trigger families into a clean 'decoder error -2'. The accompanying regression tests encode three malformed TIFF samples demonstrating the mismatch.
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:L/I:N/A:L
Untrusted TIFF is typically processed automatically by a service (AV:N, UI:N, PR:N, AC:L); impact is heap over-read disclosure (C:L) and possible crash (A:L) with no write (I:N).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Pillow is a Python imaging library. From 8.2.0 until 13.0.0, Pillow's tiled-TIFF decoder can read past the tile buffer while copying four-byte pixels. In _decodeTile, libtiff can return a tile allocation smaller than the required row stride multiplied by the tile length, and Pillow's stride-and-copy loop walks beyond that allocation. An attacker can supply a crafted tiled TIFF to an application that loads it. This can expose adjacent heap data in pixels or crash the process. This issue is fixed in version 13.0.0.
Blast Radius
ecosystem impact- 140 pypi packages depend on pillow (123 direct, 17 indirect)
Ecosystem-wide dependent count for version 8.2.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 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.
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-104606
GHSA-462x-pgg6-55fp
NVD
CVE.org
EPSS
VulDB
Exploit-DB