Buffer over-read in Pillow - CVE-2026-112394

 

Buffer over-read in Pillow - CVE-2026-112394

Published: November 3, 2026


Vulnerability identifier: #VU158905
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:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-112394
CWE-ID: CWE-126
Exploitation vector: Remote access
Exploit availability: No public exploit available

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.


Affected software

Pillow

How to mitigate CVE-2026-112394

Install security update from vendor's website.

Pillow - update to 13.0.0

External References

Related Security Bulletins