Skip to main content

CVE-2026-96640: CWE-400: Uncontrolled Resource Consumption in python-pillow Pillow

0
High
VulnerabilityCVE-2026-96640cvecve-2026-96640cwe-400cwe-407
Published: 10/21/2026 (10/21/2026, 21:03:22 UTC)
Source: CVE Database V5
Vendor/Project: python-pillow
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Affected software

python-pillow

Pillow

Affected versions
>=5.1.0 <13.0.0
pillow
pkg:pypi/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

AILast updated: 10/21/2026, 21:45:21 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses