CVE-2026-96640: CWE-400: Uncontrolled Resource Consumption in python-pillow Pillow
Description
A vulnerability in the python-pillow Pillow library versions 5.1.0 through before 13.0.0 allows uncontrolled resource consumption when processing certain malformed PDFs. The PdfParser.linearize_page_tree() function treats the PDF /Pages graph as a tree without tracking duplicate indirect references, causing exponential expansion of page references during PDF append operations. This leads to excessive CPU usage. The issue is fixed in version 13.0.0.
CVSS v4.0
Score 8.2high
Affected software
python-pillow
Pillow
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Pillow, a Python imaging library, contains a vulnerability (CVE-2026-96640) in the PdfParser.linearize_page_tree() function from versions 5.1.0 up to but not including 13.0.0. The function incorrectly treats the PDF /Pages graph as a tree without detecting duplicate indirect references. When Image.save(..., format="PDF", append=True) processes a crafted PDF with /Kids arrays repeatedly referencing the same child /Pages node, the shared subtree is expanded multiple times as distinct pages. This causes exponential growth in page references and results in disproportionate CPU consumption before the append operation completes. This is a denial-of-service type vulnerability categorized under CWE-400 (Uncontrolled Resource Consumption) and CWE-407. The vulnerability has a CVSS 4.0 score of 8.2 (high severity).
Potential Impact
An attacker can supply a specially crafted PDF file that causes Pillow to consume excessive CPU resources during PDF append operations, potentially leading to denial of service or degraded performance of applications using Pillow for PDF processing. There is no indication of privilege escalation or data disclosure. No known exploits in the wild have been reported.
Mitigation Recommendations
This vulnerability is fixed in Pillow version 13.0.0. Users should upgrade to version 13.0.0 or later to remediate this issue. No other mitigation or temporary workaround is indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-09-23T14:35:50.130Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ad92f434d27ba8daa03e67b
Added to database: 10/21/2026, 21:31:47 UTC
Last enriched: 10/21/2026, 21:45:21 UTC
Last updated: 10/21/2026, 21:45:21 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.