CVE-2026-112896: Pillow Heap Out-of-Bounds Read Due to TIFF Encoder ColorMap Mismatch

pillow Updated 20 Oct 2026

Summary

20/10/2026
Yes i
High
8.8

CVE-2026-112896: Pillow: TIFF encoder ColorMap plane-size mismatch causes a heap out-of-bounds read. Affects pillow versions < 13.0.0. Fixed in 13.0.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Pillow is a widely used Python Imaging Library that provides extensive capabilities for opening, manipulating, and saving various image file formats. It is particularly known for its ease of use and support for numerous image formats, including TIFF. However, a vulnerability has been identified in its TIFF encoder that can lead to serious security issues when processing certain TIFF files.

Vulnerability Detail

The vulnerability arises from a mismatch in the expected size of the ColorMap plane in the TIFF encoder of Pillow. When a specially crafted TIFF file is processed, the encoder allocates a fixed size for the ColorMap but does not reconcile this with the actual sample depth of the image. This can lead to a heap out-of-bounds read, potentially exposing sensitive process memory. The issue is triggered when an application saves a TIFF file with retained metadata, resulting in an attempted read of 131072 bytes from a 1536-byte allocation, which can cause application crashes and memory exposure.

How To Fix

Latest published version: 13.0.0 as of 22 Oct 2026

pip install --upgrade "pillow==13.0.0"

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid saving TIFF files with retained metadata if you are using a vulnerable version of Pillow. Alternatively, you can validate the TIFF files before processing them to ensure they do not contain malformed ColorMap entries.

Conclusion

CVE-2026-112896 represents a significant security vulnerability in the Pillow library, specifically affecting its TIFF encoder. Users are strongly advised to update to the latest version to mitigate potential risks associated with this vulnerability.

See every vulnerability recorded for pillow →

Share this vulnerability

FAQ

CVE-2026-112896 is a security vulnerability in the Pillow library that allows for a heap out-of-bounds read when processing certain TIFF files with a mismatched ColorMap.

If your application uses Pillow to process TIFF files, it may be susceptible to crashes or memory exposure if it encounters a specially crafted TIFF file.

Versions of Pillow up to and including 12.3.0 are affected by this vulnerability. The issue is resolved in version 13.0.0 and later.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The CVSS score for CVE-2026-112896 is 8.8, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for pillow.

How To Fix

Latest published version: 13.0.0 as of 22 Oct 2026

pip install --upgrade "pillow==13.0.0"

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback