IT SBIT Services
Schneeberger
DEEN
CVE tracker

Pillow: Quadratic-time denial of service in PDF save_all

CVE-2026-112894High 8.7

← All vulnerabilities

Summary

Pillow, a Python imaging library, takes quadratic time to reserve PDF object identifiers when an application saves a multi-frame image as a multi-page PDF with save_all enabled. An attacker who can submit such an image, for example a small animated PNG with a large declared frame count, can keep the conversion running at full CPU for minutes. Only applications that convert untrusted images to PDF with this option are affected; opening images alone is not. Memory use stays low, so the impact is limited to availability.

Affected

  • Pillow 5.1.0 up to, but not including, 13.0.0
  • Affected code: PDF writer (save with save_all=True)

Fixed in

  • Pillow 13.0.0

Workaround

  • No vendor workaround documented.
  • Until the upgrade, do not convert untrusted multi-frame images to PDF with save_all=True.
  • Limit upload file size and frame count before conversion, and run conversions in a separate process with a CPU time limit and timeout.

Exploitation

  • A public proof of concept (reproducer) is described in the vendor advisory.
  • No evidence of exploitation in the wild was found.
  • CISA SSVC data (secondary view) lists exploitation as poc and automatable as yes.

Our recommendation

  • Upgrade Pillow to 13.0.0 or later, prioritising internet-facing converters and upload services.
  • Check dependencies that pin Pillow (for example transitive packages) and confirm that the upgrade is permitted.
  • Until patched, apply the workaround measures above.
  • Monitor CPU usage of conversion workers for unusual long-running jobs.

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:51.

Original description (NVD)

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.

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.