Skip to content
AboutEditorial policyContactWednesday, October 21, 2026
BlueTeamInsider.Security news, verified and fast
Breaking alerts
Every story the minute it is published
Follow via RSS
Vulnerabilities

Pillow TIFF Bug CVE-2026-112902 Causes Crashes and Memory Leaks in Versions Up to 12.3.0

A high severity bug in Pillow allows crafted TIFF files to leak process memory or crash applications, affecting versions up to 12.3.0.

Pillow TIFF Bug CVE-2026-112902 Causes Crashes and Memory Leaks in Versions Up to 12.3.0
Illustration: BlueTeam Insider

Key points

  • CVE-2026-112902 affects Pillow versions 12.3.0 and earlier.
  • The flaw allows memory disclosure or segmentation faults via crafted TIFF tags.
  • Patched version 13.0.0 is available to resolve the issue.

The Pillow library contains a high severity memory disclosure vulnerability in its TIFF encoder, identified as CVE-2026-112902. Applications using Pillow version 12.3.0 or earlier are exposed to this risk when processing specific image files. The flaw resides in the libtiff encoding logic and can lead to sensitive data leakage or application crashes. This follows previous reports on Pillow vulnerabilities, such as the JPEG buffer overflow noted by this publication in October 2026.

Root cause

The vulnerability originates in the `PyImaging_LibTiffEncoderNew` function within `src/encode.c`. The code incorrectly assumes that `ImagingLibTiffMergeFieldInfo` overrides libtiff's built-in field table definitions. It does not. Consequently, libtiff interprets arguments based on its own internal tag definitions rather than Pillow's intended values. This mismatch causes the encoder to read from uninitialized memory slots or incorrect addresses when handling specific tags.

Attack path

An attacker supplies a small, crafted TIFF file to an application that re-saves images. When the application calls `Image.open()` followed by `im.save()` with the TIFF format, Pillow routes the operation through libtiff. For counted array tags, the encoder reads a byte count from the source and copies data from an unwritten argument slot. For fixed-size tags, it uses the integer value as a source address. This results in leaking process memory or triggering a segmentation fault.

Affected versions

  • Pillow versions 12.3.0 and earlier are vulnerable.
  • The issue is resolved in version 13.0.0.
  • The flaw impacts Python applications using the Pillow package for image manipulation.

Mitigation

  • Upgrade Pillow to version 13.0.0 or later immediately.
  • Avoid saving untrusted images as TIFF files if upgrading is not possible.
  • Monitor processes for unexpected memory usage spikes or crashes.

Detection notes

Security teams should review application logs for sudden segmentation faults or crashes during image processing tasks. Look for unusual outbound data transfers or large file sizes generated from small input images, which may indicate memory leakage. Check whether applications are handling untrusted TIFF files without validation. Implement strict input validation to reject malformed image files before processing. Monitor for abnormal process memory access patterns that deviate from standard image encoding behaviors.

What to do and how to stay safe: Pillow

  • Update Pillow to version 13.0.0 to eliminate the vulnerability.
  • Audit applications that save images as TIFF format to assess exposure.
  • Implement input validation to reject malformed or unexpected image files.
  • Monitor system logs for crashes or anomalies during image processing operations.

Step-by-step guide: Unpatched Software Myths: Why Common Beliefs Fail to Protect You

General security guidance from the BlueTeam Insider newsroom. It is not confirmed advice from the organisations named in this story.

Frequently asked questions

Which versions of Pillow are affected by CVE-2026-112902?

Versions 12.3.0 and earlier are affected. Version 13.0.0 contains the fix.

How does an attacker trigger this vulnerability?

By providing a crafted TIFF file that is opened and then saved as a TIFF by the application.

What is the severity of this vulnerability?

The vulnerability is rated as high severity according to the GitHub advisory.

Sources

  1. GitHub Advisory Database
PillowCVE-2026-112902Pythonlibtiffmemory disclosure

Related Posts