Description
Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow takes quadratic time to reserve PDF object identifiers when saving many frames with save_all enabled. PdfParser.next_object_id() repeatedly rebuilds and scans all previously reserved identifiers for every object. An attacker can supply a multi-frame image, including a small APNG with a large declared frame count, to an application that converts it to a multipage PDF. This can consume excessive CPU and deny service. This issue is fixed in version 13.0.0.
Published: 2026-10-19
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service via excessive CPU consumption
Action: Patch Immediately
AI Analysis

Impact

Pillow, the Python imaging library, uses a method that scales quadratically in time when saving a multi-frame image to PDF with the save_all option. Each frame causes the library to rebuild and scan all previously reserved PDF object identifiers, so an attacker can send a deliberately crafted image with many frames, such as a small APNG declaring a large frame count, and force the application to consume large amounts of CPU. The effect is a performance degradation that can lead to a denial of service for the running process or hosting environment. This weakness is recognized as CWE-407 and CWE-770.

Affected Systems

Any Python application that uses Pillow to convert images to PDF and supports the save_all feature is affected. The flaw exists across Pillow versions 5.1.0 through 13.0.0, inclusive. Applications that process user-supplied or untrusted images are most at risk, especially those that automatically convert or render images to PDF formats.

Risk and Exploitability

The CVSS score of 8.7 indicates a high severity. Because the EPSS score is unavailable, the current exploitation probability is unclear, and it is not listed in CISA's KEV catalog. Attackers can exploit the vulnerability by supplying a crafted multi-frame image whenever the application performs a PDF save_all operation. The vulnerability provides local or remote exploitation potential depending on the context in which the Pillow library is invoked; however, no authentication or privilege escalation is required, making it a straightforward denial‑of‑service vector. Upgrading to Pillow 13.0.0 eliminates the quadratic time behavior and removes the attack surface. This flaw also falls under CWE-770, indicating a resource exhaustion weakness.

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

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Pillow to v13.0.0 or later.
  • If an upgrade is not immediately possible, validate and enforce a maximum number of frames on any image before invoking save_all.
  • Monitor CPU usage of image-processing services and set thresholds to trigger alerts or throttling if anomalous consumption occurs.
  • Apply resource capping or sandboxing to limit memory and CPU usage during Pillow operations, addressing the resource exhaustion nature of the flaw.

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

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-jg86-v3jv-hrpm Pillow: Quadratic-time DoS in PDF save_all (PdfParser.next_object_id)
History

Tue, 27 Oct 2026 15:15:00 +0000

Type Values Removed Values Added
First Time appeared Python
Python pillow
CPEs cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*
Vendors & Products Python
Python pillow

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

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


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


Tue, 20 Oct 2026 00: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 22:00:00 +0000

Type Values Removed Values Added
Description Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow takes quadratic time to reserve PDF object identifiers when saving many frames with save_all enabled. PdfParser.next_object_id() repeatedly rebuilds and scans all previously reserved identifiers for every object. An attacker can supply a multi-frame image, including a small APNG with a large declared frame count, to an application that converts it to a multipage PDF. This can consume excessive CPU and deny service. This issue is fixed in version 13.0.0.
Title Pillow: Quadratic-time DoS in PDF save_all (PdfParser.next_object_id)
Weaknesses CWE-407
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
Python-pillow Pillow
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-20T14:46:13.675Z

Reserved: 2026-10-19T20:16:09.856Z

Link: CVE-2026-112894

cve-icon Vulnrichment

Updated: 2026-10-20T14:45:31.582Z

cve-icon NVD

Status : Analyzed

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

Modified: 2026-10-27T14:56:28.823

Link: CVE-2026-112894

cve-icon Redhat

Severity : Important

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

Links: CVE-2026-112894 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-20T07:15:11Z

Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity

  • CWE-770

    Allocation of Resources Without Limits or Throttling