Buffer over-read in Pillow - CVE-2026-112394
Published: November 3, 2026
Vulnerability details
The vulnerability allows a remote attacker to disclose limited heap memory contents and potentially cause a denial of service.
The vulnerability exists due to a buffer over-read in Pillow's ImagingRawDecode function and P;2L and P;4L unpackers when decoding raw image data through Image.frombytes() or Image.frombuffer(). The decoder calculates line sizes as packed pixels rather than separately byte-padded bit planes. A remote attacker can supply crafted image dimensions and an undersized buffer to cause reads of up to three bytes beyond the buffer, exposing bits of adjacent heap memory through decoded pixel values or potentially crashing the process.
The PCX decoder is not affected because it repacks rows into a format that avoids these over-reads.