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
- 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.
Affected software
| Software | Affected versions |
|---|---|
pillowPyPI · osv:PyPI:pillow |
|
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
- CVE-2026-128067Pillow: Heap buffer overflow saving TIFF with libtiff when tags override image sizeHigh 12 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-128066
- GitHub Advisory Database https://github.com/advisories/GHSA-wqgw-9xfh-qf2g