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

- Database: PyPA
- Also known as: BIT-PILLOW-2026-112896
- Published: 2026-10-19
- Modified: 2026-10-28

## Tracked as

- [CVE-2026-112896](https://cve.now/CVE-2026-112896.md): Pillow: TIFF encoder ColorMap plane-size mismatch causes a heap out-of-bounds read

## Also published as

- [GHSA-PCHR-8J38-3X4P](https://cve.now/GHSA-PCHR-8J38-3X4P.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 TIFF encoder can read beyond a ColorMap buffer when retained TIFF metadata has a plane size inconsistent with BitsPerSample. A small TIFF can be opened normally and then retain a crafted ColorMap that is reused when the image is saved. An application that re-encodes the attacker's TIFF with libtiff can trigger the out-of-bounds read. This can disclose heap memory in the output 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/d03dc3c587a9b0bdc9e4304d70d59a635a87b742
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-pchr-8j38-3x4p

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

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