CVE-2026-54059 Pillow `PcfFontFile._load_bitmaps()`: `Image.frombytes()` called without `_decompression_bomb_check()` — bomb protection bypass via PCF font loading

High 7.5 Published Updated

Attackers can cause excessive memory allocation and denial of service by providing crafted PCF font data to 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-54059?

CVE-2026-54059 is a high-severity denial of service vulnerability in Python Pillow, published on 6 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, PIL/PcfFontFile.py _load_bitmaps() read glyph dimensions from the PCF METRICS section and passed them directly to Image.frombytes() without calling Image._decompression_bomb_check(), allowing crafted PCF font data to cause excessive memory allocation. This issue is fixed in version 12.3.0.

Weakness: CWE-789

Which versions are affected by CVE-2026-54059?

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

Products include Python Pillow.

How do I fix CVE-2026-54059?

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-54059 being exploited?

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

All Python Pillow vulnerabilities

Sources

Also known as BIT-pillow-2026-54059, DEBIAN-CVE-2026-54059, ECHO-d64a-51a5-8b83, GHSA-8v84-f9pq-wr9x, MINI-2g7j-9hrp-5h88, MINI-37m8-88rr-chfr and 12 more.

Is CVE-2026-54059 in your software?

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

Check your SBOMs for free