CVE-2026-128066 Pillow: Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data

High 8.7 Published Updated

A crafted TIFF or EXIF-bearing image can exhaust memory in Pillow-based applications that parse EXIF metadata.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Harmful if only installed
No
Needs a specific call
Yes
Fix
Available

What is CVE-2026-128066?

CVE-2026-128066 is a high-severity denial of service vulnerability in python-pillow Pillow, published on 12 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-770

Which versions are affected by CVE-2026-128066?

1 open source package ship an affected version, including Pillow.

An affected version is only exploitable if your software calls ImageFileDirectory_v2.load(), getexif() or ImageOps.exif_transpose(). Many projects that include it are not exposed.

PackageAffectedFixed in
Pillow PyPI
pkg:pypi/pillow
All versions13.0.0
Status by vendor (1)
WhoReleaseStatusPackages
UpstreamfixedPillow (13.0.0)
pkg:pypi/pillow

How do I fix CVE-2026-128066?

Upgrade Pillow to 13.0.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-128066 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-128066 exists.

Sources

Also known as GHSA-wqgw-9xfh-qf2g, UBUNTU-CVE-2026-128066.

Is CVE-2026-128066 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free