CVE-2026-112898: CWE-457: Use of Uninitialized Variable in python-pillow 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
Affected software
python-pillow
Pillow
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.