Skip to main content

Python Pillow EUVDEUVD-2026-104606

| CVE-2026-112395 MEDIUM
Heap-based Buffer Overflow (CWE-122)
2026-10-19 GitHub_M GHSA-462x-pgg6-55fp
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Upload crafted tiled TIFF to image-processing app
  2. Delivery
    Pillow invokes libtiff tiled-TIFF decode path
  3. Exploit
    Undersized tile buffer triggers over-read in _decodeTile copy loop
  4. Execution
    Adjacent heap bytes copied into pixels or process crash
  5. Impact
    Heap 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Pillow 8.2.0, < 13.0.0

Affected Packages

pypi pillow fix: 13.0.0

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

Vendor (GitHub_M) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
vuln.today AI 6.5 MEDIUM

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).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
Low

Lifecycle Timeline

2
Patch available
Oct 19, 2026 - 22:03 EUVD
CVE Published
Oct 19, 2026 - 20:59 cve.org
MEDIUM 6.5

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 140 pypi packages depend on pillow (123 direct, 17 indirect)

Ecosystem-wide dependent count for version 8.2.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 83% exploitable
Prevalence
High
Pillow is the dominant imaging library across the Python ecosystem
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
High

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

More in Pillow

View all
CVE-2022-30595 CRITICAL POC
9.8 May 25

libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files. Rated

CVE-2026-59204 HIGH POC
8.7 Jul 14

Denial of service in Python Pillow (versions 8.2.0 through 12.2.0) allows remote attackers to exhaust memory during JPEG

CVE-2026-54058 HIGH POC
8.3 Jul 14

Out-of-bounds memory disclosure in Python Pillow before 12.3.0 lets an attacker who supplies a crafted McIdas AREA image

CVE-2026-59197 HIGH POC
8.2 Jul 14

Heap out-of-bounds write in Python Pillow prior to 12.3.0 lets an attacker who controls the rank-filter size parameter c

CVE-2026-59200 HIGH POC
7.5 Jul 14

Uncontrolled memory consumption in Python Pillow (PIL) versions 5.1.0 through 12.2.x allows a remote attacker to cause d

CVE-2021-23437 HIGH POC
7.5 Sep 03

The package pillow 5.2.0 and before 8.3.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the getrgb

CVE-2025-48379 HIGH POC
7.1 Jul 01

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

CVE-2016-4009 CRITICAL
9.8 Apr 13

Integer overflow in the ImagingResampleHorizontal function in libImaging/Resample.c in Pillow before 3.1.1 allows remote

CVE-2014-3007 CRITICAL
10.0 Apr 27

Python Image Library (PIL) 1.1.7 and earlier and Pillow 2.3 might allow remote attackers to execute arbitrary commands v

CVE-2026-96639 CRITICAL
9.8 Oct 21

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

CVE-2021-34552 CRITICAL
9.8 Jul 13

Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters

CVE-2021-25289 CRITICAL
9.8 Mar 19

An issue was discovered in Pillow before 8.1.1. Rated critical severity (CVSS 9.8), this vulnerability is remotely explo

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy