CVE-2026-112396
Received Received - Intake

Heap Use-After-Free in Pillow TIFF Encoding

Vulnerability report for CVE-2026-112396, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-19

Last updated on: 2026-10-19

Assigner: GitHub, Inc.

Description

Pillow is a Python imaging library. From 11.3.0 until 13.0.0, Pillow has a heap use-after-free when libtiff rejects a tag while encoding TIFF data to an in-memory buffer. When an application saves attacker-influenced TIFF tags to BytesIO, libtiff can reject a tag during encoding in ImagingLibTiffEncode; the error path then frees the output buffer without closing or clearing the TIFF handle, and later cleanup flushes through the write callback into freed memory, which can crash the process and may enable code execution. This issue is fixed in version 13.0.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-19
Last Modified
2026-10-19
Generated
2026-10-20
AI Q&A
2026-10-20
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
python-pillow Pillow >= 11.3.0, < 13.0.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-416 The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

Pillow is a Python imaging library. The vulnerability involves a heap use-after-free issue when libtiff rejects a tag while encoding TIFF data to an in-memory buffer. This happens when an application saves attacker-influenced TIFF tags to BytesIO. libtiff rejects a tag during encoding, freeing the output buffer without properly closing the TIFF handle. Later cleanup then flushes through the write callback into freed memory, causing crashes and potential code execution.

Detection Guidance

This vulnerability can be detected by checking the version of Pillow installed on your system. Run 'pip show Pillow' or 'pip list' to verify if the version is between 11.3.0 and 13.0.0. If so, the system is vulnerable.

Impact Analysis

This vulnerability can crash applications using Pillow to process TIFF images, leading to denial of service. In some cases, it may allow code execution, potentially compromising the system. Users of affected Pillow versions (11.3.0 to 12.9.0) are at risk if they handle TIFF images from untrusted sources.

Mitigation Strategies

Upgrade Pillow to version 13.0.0 or later immediately. Use 'pip install --upgrade Pillow' to apply the fix. Avoid processing untrusted TIFF files until the upgrade is complete.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-112396. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart