CVE-2026-112898
Received Received - Intake

Pillow quantize uninitialized memory disclosure

Vulnerability report for CVE-2026-112898, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-19

Last updated on: 2026-10-19

Assigner: GitHub, Inc.

Description

Pillow is a Python imaging library. From 9.1.0 until 13.0.0, Pillow can disclose uninitialized stack memory when Image.quantize() uses an empty palette. ImagingPaletteCacheUpdate() leaves a local cache array uninitialized when the palette has zero entries, and the conversion path emits those bytes as output pixel indices. An attacker who controls the palette image can obtain stack contents from a returned PNG or GIF. This can disclose addresses and stack-canary data without an out-of-bounds access, memory corruption, or process crash. This issue is fixed in version 13.0.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-19
Last Modified
2026-10-19
Generated
2026-10-20
AI Q&A
2026-10-20
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
python-pillow Pillow >= 9.1.0, < 13.0.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-457 The code uses a variable that has not been initialized, leading to unpredictable or unintended results.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

Pillow is a Python imaging library. From versions 9.1.0 to 13.0.0, it can disclose uninitialized stack memory when Image.quantize() uses an empty palette. The function ImagingPaletteCacheUpdate() leaves a local cache array uninitialized if the palette has zero entries. This causes the conversion path to emit those bytes as output pixel indices, potentially exposing stack contents in returned PNG or GIF files.

Detection Guidance

This vulnerability can be detected by checking the version of Pillow installed on your system. Run 'pip show Pillow' or 'python -c "import PIL; print(PIL.__version__)"' to verify if the version is between 9.1.0 and 12.9.9. If so, the system is vulnerable.

Impact Analysis

An attacker who controls a palette image could exploit this to obtain sensitive stack memory contents, such as memory addresses or stack canary data. This could lead to information disclosure without requiring out-of-bounds access, memory corruption, or process crashes.

Mitigation Strategies

Upgrade Pillow to version 13.0.0 or later immediately. Use 'pip install --upgrade Pillow' or your package manager to update. If upgrading is not possible, avoid using Image.quantize() with untrusted input or empty palettes.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-112898. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart