Live threats

All CVEs / Python

CVE-2026-112393Python Pillow

Heap buffer overflow and memory disclosure in Pillow compressed TIFF saving

Critical 9.2 No auth needed

Priority
70
CVSS 4.0
9.2
EPSS
—
Auth required
No
Published
Oct 19, 2026
Updated
Oct 26, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-122
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: total
Vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

What happens

Pillow versions 2.0.0 through 12.x contain a heap buffer overflow in _tiffWriteProc when saving compressed TIFF data to targets without a valid file descriptor, such as BytesIO. An attacker can craft a malicious TIFF file with controlled tags or ICC profiles to trigger a memory overflow, potentially achieving code execution or crashing the process.

Show the original NVD text

Pillow is a Python imaging library. From 2.0.0 until 13.0.0, Pillow has a heap buffer overflow and stale-heap disclosure in _tiffWriteProc when saving compressed TIFF data through libtiff to a target without a usable fileno(), such as BytesIO. The callback sizes its allocation from the prior buffer size instead of the current write position, allowing an attacker-controlled out-of-line TIFF tag or retained ICC profile to be copied beyond the allocation after libtiff seeks forward. This overflow can crash the process and may allow code execution. Independently, unwritten alignment gaps in compressed TIFF output larger than 64 KiB can disclose stale heap bytes without a crafted tag. File paths and targets with real file descriptors are unaffected. This issue is fixed in version 13.0.0.

Source text, unmodified. NVD.

What to do

Patch available · fixed versions: 13.0.0

Update Pillow to version 13.0.0 or later.

Vendor advisory · github.com ↗

  1. Apply the vendor's security update for Pillow.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI pillow ≥ 2.0.0 < 13.0.0 13.0.0 pip install "pillow>=13.0.0"

Per OSV / GitHub Advisories (GHSA-332p-7hrc-92wf). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
pythonpillow≥ 2.0.0 < 13.0.0

Official advisories

Also: Red Hat (+7), SUSE (+3)

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.