# PYSEC-2026-4327: Pillow is a Python imaging library

- Database: PyPA
- Also known as: BIT-PILLOW-2026-112394
- Published: 2026-10-19
- Modified: 2026-10-27

## Tracked as

- [CVE-2026-112394](https://cve.now/CVE-2026-112394.md): Pillow: P;2L and P;4L decoders may read 1 to 3 bytes past the passed buffer size

## Also published as

- [GHSA-4558-3H8R-V8XP](https://cve.now/GHSA-4558-3H8R-V8XP.md) (GitHub)

## Affected versions

- pillow (PyPI): fixed in 13.0.0

## Description

Pillow is a Python imaging library. Prior to 13.0.0, Pillow's P;2L and P;4L raw decoders can read past the end of an input buffer. ImagingRawDecode calculates a packed-pixel row size, while the unpackers read separately padded bit planes. A caller can supply a buffer and image dimensions whose accepted size is smaller than the unpacker's actual footprint. This can disclose up to three adjacent heap bytes in output pixels or crash the process. This issue is fixed in version 13.0.0.

## References

- https://github.com/python-pillow/Pillow/releases/tag/13.0.0
- https://github.com/python-pillow/Pillow/commit/392ee6f0d19a4adb766a63e9a99f3c28193b8d31
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-4558-3h8r-v8xp

Page: https://cve.now/PYSEC-2026-4327

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
