IT SBIT Services
Schneeberger
DEEN
CVE tracker

Pillow: Denial of service via malformed PDF page tree in append path

CVE-2026-96640High 8.2

← All vulnerabilities

Summary

Pillow, a Python imaging library, does not track duplicate references when it expands the page tree of an existing PDF in the append path (Image.save with format="PDF" and append=True). An attacker who can supply a crafted PDF to an application that appends images can cause disproportionate CPU consumption before the operation completes. The impact is limited to availability; no confidentiality or integrity impact is described. The issue is not triggered by ordinary Image.open().

Affected

  • Pillow from 5.1.0 up to and including 12.3.0 (CNA range: >= 5.1.0, < 13.0.0)
  • Only applications that call Image.save(..., format="PDF", append=True) on attacker-influenced PDF files are affected

Fixed in

  • Pillow 13.0.0

Workaround

  • Unknown. No configuration workaround is documented; upgrading to 13.0.0 is the only fix identified.
  • Until upgraded, do not pass untrusted PDF files to the append path.

Exploitation

  • No evidence of exploitation in the wild; not listed in CISA KEV.
  • CISA SSVC: exploitation status "poc", automatable: yes, technical impact: partial.
  • The GHSA contains reproduction details; no independent public exploit repository was identified.

Our recommendation

  • Check whether your applications use Pillow and whether they call the PDF append path with external PDFs.
  • Upgrade Pillow to 13.0.0 or later and check dependency pins below 13 that block the upgrade.
  • Until upgraded, do not process untrusted PDFs with append=True, especially in web forms, upload portals or automated document workflows.
  • Prioritise internet-facing services; internal batch jobs with trusted input are lower priority.

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, 15:15.

Original description (NVD)

Pillow is a Python imaging library. From 5.1.0 until 13.0.0, PdfParser.linearize_page_tree() in src/PIL/PdfParser.py treats a PDF /Pages graph as a tree without tracking duplicate indirect references. When Image.save(..., format="PDF", append=True) processes an attacker-controlled existing PDF whose /Kids arrays repeatedly reference the same child /Pages node, Pillow expands the shared subtree as distinct pages. A compact malformed PDF can therefore create exponentially many page references and consume disproportionate CPU before the append completes. This issue is fixed in version 13.0.0.

NVD references (5)

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.