CVE-2026-112896: Pillow: TIFF encoder ColorMap plane-size mismatch causes a heap out-of-bounds read

Published Oct 19, 2026
·
Updated

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.

Affected Software

1 affected component
pypi/Pillow<13.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Pillow to a version that resolves this vulnerability.

    Fixed in 13.0.0

Event History

Oct 19, 2026
CVE Published
via MITRE·09:59 PM
Data Sourced
via MITRE·09:59 PM
DescriptionWeakness
Data Sourced
via NVD·10:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using Pillow versions before 13.0.0 are exposed if they open attacker-controlled TIFF files and later save or re-encode those images using libtiff. The affected workflow specifically involves retained TIFF metadata being reused during saving.

2

What does an attacker need to do to trigger the flaw?

An attacker needs to supply a crafted TIFF whose retained ColorMap metadata has a plane size inconsistent with BitsPerSample. The application must open the TIFF and then re-encode or save it, causing the crafted ColorMap to be reused.

3

What is the impact if exploitation succeeds?

The TIFF encoder can read beyond the ColorMap buffer. This may disclose heap memory in the generated output or crash the affected process.

4

How can this be remediated?

Upgrade Pillow to version 13.0.0, which fixes the issue. If upgrading is not immediately possible, avoid re-encoding untrusted TIFF files with the affected workflow.

5

How can I determine whether my application is affected?

Check whether it uses Pillow earlier than 13.0.0 and accepts TIFF files from untrusted sources. It is affected when those files can be opened and subsequently saved or re-encoded with retained TIFF metadata.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203