Skip to main content

Pillow CVE-2026-112896

| EUVDEUVD-2026-104658 HIGH
Out-of-bounds Read (CWE-125)
2026-10-19 GitHub_M GHSA-pchr-8j38-3x4p
8.8
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Upload crafted TIFF to application
  2. Delivery
    Application re-encodes image via libtiff
  3. Exploit
    Encoder reads past ColorMap buffer
  4. Execution
    Adjacent heap bytes copied into output
  5. Impact
    Disclose heap memory or crash process

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 that the application SAVE/re-encode an attacker-supplied TIFF using Pillow's libtiff encoder path (WRITE_LIBTIFF) - simply opening the image does not trigger the bug. The malicious TIFF must retain a ColorMap whose length does not equal (1 << BitsPerSample) * 3 (e.g., a 16-bit 'I;16' image carrying an undersized ColorMap), which the encoder reuses on save. Limiting factors: the vulnerable code path is the TIFF re-encode/save operation, not decoding; it depends on libtiff-backed encoding being used; and the disclosure is limited to heap bytes adjacent to the ColorMap buffer (opportunistic, non-targeted). No authentication is required per the CVSS PR:N metric, so unauthenticated attackers can supply the input.

Impact

The supplied CVSS 4.0 base score is 8.8 (High), driven mainly by VA:H (process crash) and the network-reachable, unauthenticated, no-interaction vector (AV:N/AC:L/AT:N/PR:N/UI:N); confidentiality impact is only Low (VC:L), reflecting an uncontrolled heap-memory leak rather than targeted data theft, and there is no integrity impact (VI:N). This is CWE-125 (out-of-bounds read), an information-disclosure/DoS issue - NOT remote code execution - so the real-world severity is lower than the 8.8 headline suggests. No EPSS score, no CISA KEV listing, and no public exploit code were provided - only the vendor fix commit - so there is no public exploit identified at time of analysis. The AV:N rating is realistic ONLY for the specific class of applications that automatically re-encode/save attacker-supplied TIFFs with libtiff; the flaw is not triggered merely by opening an image, which meaningfully narrows the exposed population. Net: a genuine but conditional priority for services that accept and re-encode user TIFFs (patch promptly), but not a drop-everything internet-wide threat absent EPSS/KEV signals.

Exploit ScenarioDerived

An image-processing service accepts user TIFF uploads, opens them with Pillow, and then re-encodes or converts them (e.g., thumbnailing) via the libtiff path. An attacker uploads a small, valid-looking TIFF that retains a crafted ColorMap whose size is inconsistent with BitsPerSample; on save the encoder reads past the ColorMap buffer, leaking adjacent heap bytes into the output image or crashing the worker process. No public exploit code was identified - only the upstream fix commit is available.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.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

Out-of-bounds read in Pillow's TIFF encoder before 13.0.0 allows unauthenticated remote attackers to leak heap memory or cause a denial of service (process crash) when an application saves or re-encodes a malicious TIFF using the libtiff encoder. Exploitation requires the target to re-encode the attacker-supplied image-simply opening it does not trigger the bug-and the leak is limited to adjacent heap bytes rather than targeted data. No public exploit has been identified at time of analysis, and the vendor has released Pillow 13.0.0 to fix the issue.

RemediationAI

Vendor-released patch: 13.0.0. Upgrade to Pillow 13.0.0 or later, which enforces that the ColorMap length equals (1 << BitsPerSample) * 3 and replaces the fixed 8-bit stride with a dynamic stride; see the vendor advisory at https://github.com/python-pillow/Pillow/security/advisories/GHSA-pchr-8j38-3x4p and release notes at https://github.com/python-pillow/Pillow/releases/tag/13.0.0. If immediate upgrade is not possible, avoid re-encoding untrusted TIFF images with Pillow's libtiff encoder (set TiffImagePlugin.WRITE_LIBTIFF to False or isolate TIFF conversion in a separate low-privilege process), strip or reject incoming TIFF ColorMap tags whose length is not 3 * 2^BitsPerSample before saving, and run TIFF re-encoding in a sandboxed, memory-limited environment to contain crashes and heap disclosures. These workarounds trade performance, output compatibility, and image fidelity for reduced exposure, but they do not eliminate the underlying read and should be considered temporary.

Affected VersionsENISA

Pillow < 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

The vulnerability is a CWE-125 out-of-bounds read in Pillow's TIFF encoding path, specifically when the libtiff-backed encoder is used. In TIFF, the ColorMap tag stores palette entries and must contain exactly 3 * (1 << BitsPerSample) values; for an 8-bit image that is 768 entries, while a 16-bit image requires 196608 entries. Pillow retains TIFF metadata when opening an image, so a crafted TIFF can carry an undersized ColorMap whose length does not match its BitsPerSample. During a subsequent save/re-encode, the vulnerable encoder reused that retained ColorMap and previously assumed an 8-bit palette with a hardcoded stride of 256 and a fixed 768-entry length check, causing it to read past the ColorMap buffer when the sample depth was higher. The upstream fix adds a _validate_tags check that requires len(ColorMap) == (1 << BitsPerSample) * 3 and changes the C encoder to derive stride dynamically from BitsPerSample, raising a ValueError on mismatch (for example, Requiring 196608 items for Colormap for a 16-bit image).

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 8.8 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.2 HIGH

Unauthenticated remote attacker supplies a TIFF the application re-encodes; OOB read leaks limited adjacent heap memory (C:L) and can crash the process (A:H), with no integrity impact and no scope change.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Oct 19, 2026 - 23:18 EUVD
CVE Published
Oct 19, 2026 - 21:59 cve.org
HIGH 8.8

DescriptionCVE.org

Pillow is a Python imaging library. Prior to 13.0.0, Pillow's TIFF encoder can read beyond a ColorMap buffer when retained TIFF metadata has a plane size inconsistent with BitsPerSample. A small TIFF can be opened normally and then retain a crafted ColorMap that is reused when the image is saved. An application that re-encodes the attacker's TIFF with libtiff can trigger the out-of-bounds read. This can disclose heap memory in the output 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
  • 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-125, out-of-bounds read in Pillow's TIFF encoder.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Pillow, the Python imaging library embedded in many of our internal and customer-facing upload, thumbnail, and document-processing pipelines, contains a high-severity memory-handling flaw in its TIFF encoder that can crash processing services and expose small fragments of adjacent process memory. Any service that accepts user-supplied images and re-saves or converts them to TIFF is in scope, meaning availability of image workflows and potential cross-request data exposure are the core leadership concerns. A vendor fix already exists, so the residual risk is driven primarily by how quickly engineering teams can inventory and upgrade affected deployments.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
High
de facto Python imaging library, very widely deployed in web/app stacks
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

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 HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
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.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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