Use of Uninitialized Variable in Pillow - CVE-2026-112898
Published: November 3, 2026
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.