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

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

- **Severity:** High 8.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`)
- **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 (`ImageFileDirectory_v2.load()`, `getexif()`, `ImageOps.exif_transpose()`)
- **Fix available:** Yes
- **Published:** 12 Nov 2026
- **Updated:** 17 Nov 2026
- **Also known as:** GHSA-wqgw-9xfh-qf2g, UBUNTU-CVE-2026-128066

## 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 (Allocation of Resources Without Limits or Throttling)

## 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.


| Package | Ecosystem | PURL | Affected | Fixed in |
| --- | --- | --- | --- | --- |
| `Pillow` | PyPI | `pkg:pypi/pillow` | All versions | 13.0.0 |

Status by vendor (upstream, then each distribution release and vendor build):

| Who | Release | Status | Packages | Fixed in |
| --- | --- | --- | --- | --- |
| Upstream |  | fixed | `Pillow` | 13.0.0 |

## How do I fix CVE-2026-128066?

Upgrade Pillow to 13.0.0 or later.

## Is CVE-2026-128066 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-128066 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-128066 exists.
Exposure: 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.

Affected packages and fixed versions:
- Pillow (PyPI): affected all versions; fixed in 13.0.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
   If an affected version is present, also search the code for calls to ImageFileDirectory_v2.load(), getexif() or ImageOps.exif_transpose() and report whether any exist.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-128066/ (Markdown: https://insights.sbomify.com/CVE-2026-128066/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-128066
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-128066
- OSV: https://osv.dev/vulnerability/CVE-2026-128066

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-128066/
Summaries are generated and may contain mistakes; the official description above is the record.
