Pillow: APNG background disposal allocates full canvas before decompression bomb check
Impact
Pillow, a Python imaging library, has a vulnerability in versions 8.1.0 to 13.0.0 where it can allocate memory for an APNG disposal background at the full canvas size before checking for decompression bombs, potentially exhausting memory and denying service. An attacker with access to crafted APNG files can exploit this weakness. The issue is related to excessive memory allocation.
Summarized by @cf/meta/llama-3.3-70b-instruct-fp8-fast. Verify details against the original sources.Affected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
python-pillow · GitHub_M
Pillow
1 range
python-pillow · GitHub_M
Pillow
Compare with this publisher’s ranges. This does not inspect your installation.
affected
>= 8.1.0, < 13.0.0
Other versions: unknown
Original source 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.
Inside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
CVE-2026-112399View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.
cve.new JSON →Underlying weaknesses
The source’s classification of what caused the vulnerability.
Contributing organizations · 2
Assigning organization
Additional data publisher
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.