Skip to main content

CVE-2026-112898: CWE-457: Use of Uninitialized Variable in python-pillow Pillow

0
Medium
VulnerabilityCVE-2026-112898cvecve-2026-112898cwe-457
Published: 10/19/2026 (10/19/2026, 22:04:23 UTC)
Source: CVE Database V5
Vendor/Project: python-pillow
Product: Pillow

Description

Pillow, a Python imaging library, has a vulnerability in versions from 9.1.0 up to but not including 13.0.0 where uninitialized stack memory can be disclosed when Image.quantize() is called with an empty palette. This occurs because a local cache array is left uninitialized if the palette has zero entries, causing potentially sensitive stack data to be included in output PNG or GIF images. The issue is fixed in version 13.0.0.

CVSS v4.0

Score 6.9medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
Low
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Affected software

python-pillow

Pillow

Affected versions
>=9.1.0 <13.0.0
pillow
pkg:pypi/pillow

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/19/2026, 22:33:27 UTC

Technical Analysis

CVE-2026-112898 describes a use of uninitialized variable vulnerability (CWE-457) in the Pillow library. Specifically, when Image.quantize() is used with an empty palette, the function ImagingPaletteCacheUpdate() leaves a local cache array uninitialized. The conversion process then outputs these uninitialized bytes as pixel indices in PNG or GIF images. This can lead to disclosure of stack contents such as addresses and stack-canary values without causing out-of-bounds access, memory corruption, or process crashes. The vulnerability affects Pillow versions >=9.1.0 and <13.0.0 and was fixed in version 13.0.0.

Potential Impact

An attacker who can control the palette image used in Image.quantize() can cause the application to disclose uninitialized stack memory in returned PNG or GIF images. This leakage can reveal sensitive information such as memory addresses and stack canaries, which could aid further attacks. However, the vulnerability does not lead to memory corruption, crashes, or direct code execution. The CVSS 4.0 score is 6.9 (medium severity) reflecting the confidentiality impact without integrity or availability impact.

Mitigation Recommendations

Upgrade Pillow to version 13.0.0 or later, where this vulnerability is fixed. No other mitigations are indicated or required per the available data.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-10-19T20:16:09.857Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6ad697602cdf04f6569bbdc7

Added to database: 10/19/2026, 22:19:12 UTC

Last enriched: 10/19/2026, 22:33:27 UTC

Last updated: 10/19/2026, 22:48:22 UTC

Views: 9

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses