Use of Uninitialized Variable in Pillow - CVE-2026-112898

 

Use of Uninitialized Variable in Pillow - CVE-2026-112898

Published: November 3, 2026


Vulnerability identifier: #VU158894
CSH Severity: Medium
CVSS v4: 6.9 [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]
CVE-ID: CVE-2026-112898
CWE-ID: CWE-457
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to disclose 512 bytes of process stack memory through returned image pixels, potentially exposing memory addresses and the stack-protector canary.

The vulnerability exists due to use of an uninitialized stack variable in ImagingPaletteCacheUpdate() in src/libImaging/Palette.c when Image.quantize(palette=...) processes a palette image with zero entries. A remote attacker can supply an empty-palette image to an application that accepts user-controlled reference palettes and returns the quantized result to retrieve stack bytes copied into the colour cache and emitted as output pixel indices.

For RGB source images, both dithering modes are affected; grayscale L sources bypass the vulnerable cache.


Affected software

Pillow

How to mitigate CVE-2026-112898

Install security update from vendor's website.

Pillow - update to 13.0.0

External References

Related Security Bulletins