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.
Published: 2026-10-19
Score: 8.7 High
EPSS: n/a
KEV: No
Impact: Denial of Service due to memory exhaustion
Action: Patch Now
AI Analysis

Impact

Pillow, a widely used Python imaging library, can allocate a full-size background buffer for animation PNG (APNG) frames before checking for a decompression bomb. If an attacker supplies an APNG that declares a tiny first frame, a very large canvas, and a background‑disposal operation, Pillow will create a full‑canvas memory allocation inside Image.open() even though no pixel data is processed yet. This out‑of‑bounds allocation flaw (CWE-789) can quickly exhaust the process’s memory and cause a denial‑of‑service without compromising the host system.

Affected Systems

The flaw affects the Pillow library distributed as python-pillow:Pillow and applies to all releases from 8.1.0 up to, but not including, 13.0.0. Any application that loads PNG or APNG files—such as web image upload handlers, server‑side image converters, or desktop graphics tools—running those Pillow versions may be impacted.

Risk and Exploitability

The CVSS score of 8.7 indicates a high‑severity condition. EPSS is not available, and the vulnerability is not listed in CISA's KEV catalog, but the lack of these metrics does not reduce the risk. Based on the description, it is inferred that the vulnerability can be triggered by supplying a crafted APNG file to any invocation of Image.open(), whether the file comes from a local upload, a network transfer, or embedded user data. Exploitation requires only the malicious file, making it relatively straightforward for an attacker with access to the input processing pipeline.

Generated by OpenCVE AI on October 20, 2026 at 01:01 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Pillow to version 13.0.0 or later, which includes the APNG background disposal allocation fix.
  • Validate the declared canvas size of any PNG before invoking Image.open(); reject files whose canvas dimensions exceed acceptable memory limits.
  • Run Pillow image processing in a sandboxed environment with strict memory quotas to contain potential resource exhaustion.

Generated by OpenCVE AI on October 20, 2026 at 01:01 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 20 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-770
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Important


Mon, 19 Oct 2026 23:00:00 +0000

Type Values Removed Values Added
First Time appeared Python-pillow
Python-pillow pillow
Vendors & Products Python-pillow
Python-pillow pillow

Mon, 19 Oct 2026 21:30:00 +0000

Type Values Removed Values Added
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.
Title Pillow: APNG background disposal allocates full canvas before decompression bomb check
Weaknesses CWE-789
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

Python-pillow Pillow
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-19T21:10:11.266Z

Reserved: 2026-10-19T16:58:51.959Z

Link: CVE-2026-112399

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-19T22:17:07.240

Modified: 2026-10-19T22:17:07.240

Link: CVE-2026-112399

cve-icon Redhat

Severity : Important

Publid Date: 2026-10-19T21:10:11Z

Links: CVE-2026-112399 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-20T01:15:06Z

Weaknesses
  • CWE-770

    Allocation of Resources Without Limits or Throttling

  • CWE-789

    Memory Allocation with Excessive Size Value