Pillow: Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Pillow 13.0.0 and pillow 13.0.0.
Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| python-pillow | >=1.0 <13.0.0 | ||
| pypi: Pillow | <=12.3.0 | 13.0.0 | |
| pypi: pillow | <13.0.0 | 13.0.0 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Pillow (PyPI), strongest first
Embed
A live severity badge for an advisory, README or ticket