CVE-2026-54058 Pillow: Out-of-bounds read via attacker-controlled row stride on Pillow's mmap path (McIdas AREA files)

High 8.3 Published Updated

An attacker can disclose adjacent process memory or cause a crash by crafting a malicious McIdas AREA image file processed by the Pillow library.

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-54058?

CVE-2026-54058 is a high-severity 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. Prior to 12.3.0, when Pillow loads an uncompressed McIdas AREA image from a filename through the mmap raw codec path, attacker-controlled header words can set a row stride smaller than the natural row width, causing pixel access such as Image.tobytes(), getpixel, convert, or save to read beyond the mapped region and disclose adjacent process memory or fault. This issue is fixed in version 12.3.0.

Weakness: CWE-125

Which versions are affected by CVE-2026-54058?

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

PackageAffectedFixed in
pillow BitnamiAll versions12.3.0
pillow PyPIAll versions12.3.0
pillow PyPIAll versions12.3.0
pillow PyPIAll versions12.3.0
Linux distribution packages (1)
python-graphifyy openSUSE:TumbleweedAll versions0.9.65-1.1

Products include Python Pillow.

How do I fix CVE-2026-54058?

Upgrade pillow to 12.3.0 or later.

Is CVE-2026-54058 being exploited?

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

All Python Pillow vulnerabilities

Sources

Also known as BIT-pillow-2026-54058, DEBIAN-CVE-2026-54058, ECHO-f65c-df45-7f47, GHSA-62p4-gmf7-7g93, MINI-27fx-j72j-9hxv, MINI-3qrc-hh2c-6324 and 13 more.

Is CVE-2026-54058 in your software?

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

Check your SBOMs for free