---
title: "CVE-2026-96640"
canonical_url: "https://pkgseek.com/security/CVE-2026-96640"
locale: "en"
source: "pkgseek"
entity_type: "cve"
severity: "high"
---

# CVE-2026-96640

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.

CVE-2026-96640 is rated HIGH (7.5), with 9 indexed affected package builds across 4 distributions.

- **Severity / Score**: HIGH (7.5)
- **Affected builds**: 9
- **Affected distros**: 4
- **Distros with fixed_in**: Alibaba Cloud Linux, Oracle Linux

## Affected Packages

| Distribution | Release | Package | Version | Fixed In |
| --- | --- | --- | --- | --- |
| Alibaba Cloud Linux | 3 | python3-pillow | 5.1.1-23.al8 | 5.1.1-36.al8 |
| Debian | trixie | python3-pil | 11.1.0-5+deb13u4 | — |
| Debian | trixie | python3-pil.imagetk | 11.1.0-5+deb13u4 | — |
| Debian | trixie | python-pil-doc | 11.1.0-5+deb13u4 | — |
| Oracle Linux | 8 | python3-pillow | 5.1.1-23.el8_10 | 5.1.1-33.el8_10 |
| Ubuntu | jammy | python3-pil | 9.0.1-1build1 | — |
| Ubuntu | jammy | python-pil-doc | 9.0.1-1build1 | — |
| Ubuntu | noble | python3-pil | 10.2.0-1build1 | — |
| Ubuntu | noble | python-pil-doc | 10.2.0-1build1 | — |
