IT SBIT Services
Schneeberger
DEEN
CVE tracker

Pillow: Memory exhaustion via crafted APNG during Image.open()

CVE-2026-112399High 8.7

← All vulnerabilities

Summary

Pillow, a Python imaging library, allocates and fills a full-canvas memory buffer for animated PNG files (APNG) with background or previous-frame disposal before the decompression bomb check runs. A crafted file of about 126 bytes can therefore cause a multi-gigabyte memory spike when opened with default settings. An attacker who can make an application open an untrusted image can exhaust memory and crash the process (denial of service).

Affected

  • Pillow 8.1.0 up to, but not including, 13.0.0 (GHSA lists 8.1.0 through 12.3.0)

Fixed in

  • Pillow 13.0.0

Workaround

  • Reject animated PNG uploads (detect the acTL chunk before the first IDAT) at the application or proxy layer
  • Enforce upload size and memory limits for image processing
  • No workaround is provided in the CVE record

Exploitation

  • No known exploitation in the wild at the time of research; not verified against the CISA KEV catalogue
  • No public proof of concept found; EPSS 0.00386
  • CISA SSVC: exploitation poc, automatable yes, technical impact partial

Our recommendation

  • Inventory Python environments and container images for Pillow below 13.0.0, including transitive dependencies
  • Upgrade to Pillow 13.0.0 or later and rebuild containers
  • Until patched, apply the APNG rejection and memory limits on public upload paths
  • Check distribution vendor advisories for OS-packaged Pillow versions

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 01:53.

Original description (NVD)

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.

NVD references (4)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.