CVE-2026-112404: Pillow: OOB read in TiffDecode.c tile and RGBA paths leaks heap memory into pixels
Pillow is a Python imaging library. From 8.1.0 until 13.0.0, Pillow's TIFF tile and RGBA decode paths can read beyond row data produced by libtiff. In decodeTile and the RGBA unpacker path, when Pillow and libtiff interpret duplicated PhotometricInterpretation or BitsPerSample tags differently, Pillow does not verify that the required input row fits inside the row libtiff produced, while the strip path has this validation. Loading pixels from such a crafted TIFF can expose adjacent heap data in output pixels or crash the process. This issue is fixed in version 13.0.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Pillowto a version that resolves this vulnerability.Fixed in 13.0.0
Event History
Frequently Asked Questions
Which Pillow deployments are affected?
Pillow versions from 8.1.0 up to, but not including, 13.0.0 are affected. The issue is fixed in Pillow 13.0.0.
What must an attacker provide to trigger the issue?
An attacker needs to supply a crafted TIFF whose duplicated PhotometricInterpretation or BitsPerSample tags are interpreted differently by Pillow and libtiff. The vulnerable behavior occurs when the application loads pixel data from that TIFF.
What is the practical impact for applications processing untrusted TIFF files?
Processing a malicious TIFF can expose adjacent heap memory in decoded output pixels or crash the process. Applications that accept or process attacker-controlled TIFF uploads are therefore exposed to both information disclosure and availability impact.
Are all TIFF decoding paths affected?
The affected paths are TIFF tile decoding and the RGBA unpacker path. The description states that the strip path includes validation that the affected paths lack.