CVE-2026-59203 Pillow EpsImagePlugin negative %%BeginBinary byte count causes infinite loop denial of service

Medium 5.3 Published Updated

A crafted EPS file with a negative byte count causes an infinite loop in Pillow's parser, leading to denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-59203?

CVE-2026-59203 is a medium-severity denial of service vulnerability in Python Pillow, published on 14 Jul 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 12.0.0 through 12.2.0, Pillow's EPS parser in PIL/EpsImagePlugin.py accepts a negative byte count in the %%BeginBinary directive, allowing a crafted EPS file to cause Image.open() to seek backwards to the same directive and parse it repeatedly in an infinite loop. This issue is fixed in version 12.3.0.

Weakness: CWE-835

Which versions are affected by CVE-2026-59203?

4 open source packages ship an affected version, including pillow. It affects 1 product.

PackageAffectedFixed in
pillow BitnamiFrom 12.0.012.3.0
pillow PyPIFrom 12.0.012.3.0
pillow PyPIFrom 12.0.012.3.0
pillow PyPIFrom 12.0.012.3.0

Products include Python Pillow.

How do I fix CVE-2026-59203?

Upgrade pillow to 12.3.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-59203 being exploited?

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

All Python Pillow vulnerabilities

Sources

Also known as BIT-pillow-2026-59203, DEBIAN-CVE-2026-59203, ECHO-9f30-2662-0f87, GHSA-pg7v-jwj7-p798, MINI-24v6-5w5r-gp9w, MINI-33p8-x982-5jxx and 11 more.

Is CVE-2026-59203 in your software?

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

Check your SBOMs for free