All vulnerabilities

PyPI

CVE-2026-128066

Pillow: Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data

Severity
Medium
Published
12 Nov 2026
Last changed
12 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
13.0.0
Exploit chance
0.5% in the next 30 daysHigher than 42% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Allocation without limits (CWE-770)
Also known as
GHSA-wqgw-9xfh-qf2g
Sources
OSV.dev and GitHub

Description

A small, crafted image file can make Pillow use thousands of times its own size in memory while the file is only being opened, which lets anyone who can submit an image crash or stall the process handling it. A 144 KB TIFF makes Image.open() return normally while holding 1.6 GiB of memory. The largest such standard TIFF, about 786 KB, asks for roughly 48 GiB, which in practice gets the worker killed by the operating system. The file declares a 1×1 image, so the decompression-bomb check never triggers and no warning is raised. There is no memory corruption; the impact is denial of service.

The bug is in ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py (around line 927). For every directory entry whose value is stored elsewhere in the file, it reads that value into a new bytes object with ImageFile._safe_read(fp, count * unit_size) and keeps it in _tagdata. _safe_read() only checks that the bytes exist.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
pillowPyPI · osv:PyPI:pillow
  • Every version before 13.0.0

About pillow

Weekly downloads (PyPI)
162,458,184PyPI Stats, 24 Nov 2026

Vulnerabilities in pillow

In our list
2
Published in the last 12 months
2
Critical, last 12 months
0
High, last 12 months
1
Known exploited
0
Search the list for pillow

References