CVE-2026-112399 Pillow: APNG background disposal allocates full canvas before decompression bomb check

High 8.7 Published Updated

Attackers can cause memory exhaustion and denial of service by crafting APNG images that trigger premature full-canvas allocation in Pillow.

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

CVE-2026-112399 is a high-severity denial of service vulnerability in Python Pillow, published on 19 Oct 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 8.1.0 until 13.0.0, Pillow can allocate an APNG disposal background at the full canvas size before applying the decompression-bomb check. A crafted APNG with a small first frame, a very large declared canvas, and background disposal or first-frame OP_PREVIOUS reaches PngImageFile._seek while Image.open() positions frame zero. The full-canvas allocation occurs inside Image.open() without requiring pixel loading or frame iteration. This can exhaust memory and deny service. This issue is fixed in version 13.0.0.

Weakness: CWE-789

Which versions are affected by CVE-2026-112399?

3 open source packages ship an affected version, including pillow and Pillow. It affects 1 product.

PackageAffectedFixed in
pillow BitnamiFrom 8.1.013.0.0
pillow PyPIFrom 8.1.013.0.0
Pillow PyPIFrom 8.1.013.0.0

Products include Python Pillow.

How do I fix CVE-2026-112399?

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

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

All Python Pillow vulnerabilities

Sources

Also known as BIT-pillow-2026-112399, DEBIAN-CVE-2026-112399, ECHO-e11c-23d5-d896, GHSA-5xm2-6676-qcp9, ROOT-APP-PYPI-CVE-2026-112399, UBUNTU-CVE-2026-112399.

Is CVE-2026-112399 in your software?

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

Check your SBOMs for free