CVE-2026-112396
published 2026-10-19CVE-2026-112396: 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…
PriorityP345high7.5CVSS 3.1
AVNACLPRNUINSUCNINAH
EPSS
0.59%
47.8th percentile
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.
Affected
86 ranges· showing 25
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| ansible-automation-platform-25 | lightspeed-chatbot-rhel8 | — | — |
| ansible-automation-platform-26 | hub-rhel9 | — | — |
| ansible-automation-platform-26 | lightspeed-chatbot-rhel9 | — | — |
| ansible-automation-platform-27 | hub-rhel9 | — | — |
| ansible-automation-platform-27 | lightspeed-chatbot-rhel9 | — | — |
| ansible-automation-platform | automation-dashboard-rhel9 | — | — |
| exploit-intelligence | vulnerability-analysis-rhel9 | — | — |
| lightspeed-core | lightspeed-stack-rhel9 | — | — |
| lightspeed-core | rag-tool-cpu-rhel9 | — | — |
| lightspeed-core | rag-tool-cuda-12.9-rhel9 | — | — |
| lightspeed-services-ocp | ocp-rules-rhel9 | — | — |
| openshift-lightspeed-tech-preview | lightspeed-rag-tool-rhel9 | — | — |
| openshift-lightspeed | lightspeed-ocp-rag-rhel9 | — | — |
| openshift-lightspeed | lightspeed-service-api-rhel9 | — | — |
| python-pillow | pillow | — | — |
| python | pillow | >= 11.3.0 < 13.0.0 | 13.0.0 |
| python | pillow | >= 11.3.0 < 13.0.0 | 13.0.0 |
| quay | quay-rhel8 | — | — |
| quay | quay-rhel9 | — | — |
| rhai-early-access | docling-sdk-cuda-rhel9 | — | — |
| rhai-early-access | docling-serve-cuda-rhel9 | — | — |
| rhai | guidellm-rhel9 | — | — |
| rhaii | model-opt-cuda-rhel9 | — | — |
| rhaii | vllm-cpu-rhel9 | — | — |
| rhaii | vllm-cuda-rhel9 | — | — |
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vendor_redhat5.9MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Pillow: Heap use-after-free when encoding TIFF to an in-memory buffer
ghsa·2026-10-21
CVE-2026-112396 [MEDIUM] CWE-416 Pillow: Heap use-after-free when encoding TIFF to an in-memory buffer
Pillow: Heap use-after-free when encoding TIFF to an in-memory buffer
### Summary
Saving an image as TIFF to an in-memory buffer can trigger a heap use-after-free if libtiff rejects a tag at encode time. When `TIFFWriteScanline` fails, the encoder frees its output buffer but leaves the libtiff handle open. Later, when the encoder object is torn down, `TIFFClose` flushes buffered bytes through the write callback and writes into the freed buffer. An application that re-encodes attacker-influenced images to TIFF in memory can be crashed and is a candidate for remote code execution.
### Details
The failure path in `ImagingLibTiffEncode` frees `clientstate->data` for the in-memory case but does not close the TIFF or null `clientstate->tiff` (the file-descriptor branch just above it does set `
VulDB
Pillow up to 12.x LibTIFF Encoding ImagingLibTiffEncode use after free
vuldb·2026-10-20·CVSS 5.9
CVE-2026-112396 [MEDIUM] Pillow up to 12.x LibTIFF Encoding ImagingLibTiffEncode use after free
A vulnerability identified as problematic has been detected in Pillow up to 12.x. This vulnerability affects the function ImagingLibTiffEncode of the component LibTIFF Encoding. This manipulation causes use after free.
This vulnerability is tracked as CVE-2026-112396. The attack is possible to be carried out remotely. No exploit exists.
You should upgrade the affected component.
Red Hat
pillow: pillow: arbitrary code execution via heap use-after-free during TIFF encoding
vendor_redhat·2026-10-19·CVSS 5.9
CVE-2026-112396 [MEDIUM] CWE-825 pillow: pillow: arbitrary code execution via heap use-after-free during TIFF encoding
pillow: pillow: arbitrary code execution via heap use-after-free during TIFF encoding
A flaw was found in Pillow. This vulnerability allows a remote attacker to potentially execute arbitrary code or cause a Denial of Service (DoS). The issue occurs when an application encodes Tagged Image File Format (TIFF) data with untrusted tags into an in-memory buffer. When an invalid tag is rejected during encoding, improper error handling prematurely frees memory that is subsequently accessed during cleanup, triggering a heap use-after-free condition.
Package: exploit-intelligence/vulnerability-analysis-rhel9 (Exploit Intelligence) - Out of support scope
Package: lightspeed-core/lightspeed-stack-rhel9 (Lightspeed Core) - Fix deferred
Package: lightspeed-core/rag-tool-cpu-rhel9 (Lightspeed Core)
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
2026-10-19
Published