Skip to main content

Pillow EUVDEUVD-2026-107570

| CVE-2026-96640 HIGH
Uncontrolled Resource Consumption (CWE-400)
8.2
CVSS 4.0 · Vendor
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted malformed PDF to app
  2. Exploit
    Invoke Image.save PDF append on it
  3. Execution
    Shared /Pages subtree expands exponentially
  4. Impact
    CPU exhaustion / denial of service

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target application to call Image.save(..., format="PDF", append=True) on an attacker-controlled existing PDF - i.e., the PDF-append merge workflow must be exposed to untrusted input. The malicious PDF must contain /Pages /Kids arrays that repeatedly reference the same child /Pages node so PdfParser.linearize_page_tree() expands the shared subtree into exponentially many pages. Limiting factors: this is NOT triggered by ordinary image decoding or standalone PDF export - only the append-to-existing-PDF path reads and re-linearizes the attacker's /Pages graph; impact is confined to CPU/availability (DoS) with no code execution or data disclosure; and only Pillow versions 5.1.0 through 12.x are affected (13.0.0 adds cyclic/duplicate-reference detection). Authentication requirement is unauthenticated per CVSS PR:N, but reachability depends on the application exposing this feature to attacker-supplied PDFs.

Impact

This is a resource-exhaustion denial of service (CWE-400) with no confidentiality or integrity impact, as confirmed by the CVSS 4.0 vector (VC:N/VI:N/VA:H). The headline score of 8.2 is driven almost entirely by VA:H (high availability impact) combined with AV:N/AC:L/PR:N/UI:N. Crucially, the vector carries AT:P (Attack Requirements: Present), meaning exploitation is not possible against arbitrary default usage - the target application must specifically process an attacker-controlled PDF via the PDF-append code path. No CISA KEV listing is present and no EPSS score was provided in the input, so there is no signal of active or widespread exploitation; the exploitation probability should be treated as UNKNOWN rather than low. No standalone public exploit was identified, though the fix commit (6f0e7ee) ships a regression test that demonstrates the duplicate/cyclic-reference condition. Net assessment: the product (Pillow) is extremely widely deployed, but the vulnerable feature (Image.save append=True on untrusted PDFs) is a narrow workflow, and the worst-case outcome is CPU/availability degradation rather than compromise. This is a legitimate but conditional DoS issue - patch on normal cadence; it is not a high-CVSS-but-trivially-remote-RCE emergency. The AT:P requirement and DoS-only impact should temper the raw 8.2 when prioritizing.

Exploit ScenarioDerived

An application uses Pillow's Image.save(..., format="PDF", append=True) to append image pages to an existing PDF that originates from an untrusted source (e.g., a user upload or document-merge service). An attacker submits a tiny malformed PDF whose /Kids arrays repeatedly reference the same shared /Pages node; linearize_page_tree() expands the shared subtree as if each reference were distinct, creating exponentially many page references and consuming disproportionate CPU before (or instead of) completing, stalling the worker. No public weaponized exploit was identified, but the fix commit includes a proof-style regression test demonstrating the condition. Attack vector is network/low-complexity but gated by the application exposing the PDF-append workflow.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Oct 21, 2026

Denial of service in Pillow's PDF append workflow (versions 5.1.0 through 12.x) lets an unauthenticated remote attacker exhaust CPU by supplying a compact malformed PDF whose /Pages /Kids arrays repeatedly reference the same child /Pages node. When an application calls Image.save(..., format="PDF", append=True) on that attacker-controlled file, PdfParser.linearize_page_tree() expands the shared subtree as if it were distinct pages, producing exponentially many page references before the append completes. Impact is availability-only (C:N/I:N/A:H) and reachability is narrow - ordinary image decoding and standalone PDF export never hit this code path - so no public exploit code has been identified at time of analysis and the issue is fixed in Pillow 13.0.0.

Earlier versions of this analysis (1)
v1 Oct 21, 2026 - 20:16

Pillow releases before 13.0.0 can be driven into memory and CPU exhaustion when an application uses Pillow's PDF append/save path on an attacker-supplied PDF whose page tree repeatedly references the same page objects. Only workflows that parse and re-write attacker-controlled PDF input (for example Image.save(..., append=True) or appending images into an existing PDF) reach the vulnerable code - simply opening or thumbnailing an image does not. Impact is limited to availability (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H); no public exploit code or CISA KEV entry was identified at time of analysis, and the flaw is fixed in Pillow 13.0.0 (released 2026-10-16) as one of more than 40 security fixes in that release.

RemediationAI

Upgrade to Pillow 13.0.0, which adds cyclic and duplicate indirect-reference detection to PdfParser.linearize_page_tree() and is the version referenced by GHSA-mrfp-p49p-3hf2 and the 13.0.0 release notes (https://pillow.readthedocs.io/en/stable/releasenotes/13.0.0.html). Where an immediate upgrade is not possible, the most effective control is to stop passing untrusted PDFs to Image.save(..., format="PDF", append=True): restrict that merge feature to operator-supplied or already-validated documents, since the vulnerable traversal is only reached on the append-to-existing-PDF path and normal image decoding and standalone PDF export are unaffected (trade-off: the PDF merge use case is lost for untrusted uploads). A second option is to pre-screen uploaded PDFs with an independent, hardened parser or a page-count/structure limit before Pillow touches them, rejecting files whose page tree contains repeated or cyclic indirect references - this costs an extra parsing dependency and can still miss obfuscated variants. Finally, run the append operation under an enforced CPU/RSS ceiling (process timeout, container cpu quota, or a worker sandbox) so an exponential expansion is killed rather than saturating the host; this contains blast radius but does not remove the bug. Note that the CVSS 4.0 score of 8.2 assumes AV:N/AC:L, while the independent assessment scores CVSS 3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H, reflecting that exploitation requires the application to expose the PDF-append path to attacker-controlled input.

Affected VersionsENISA

Pillow 5.1.0, < 13.0.0

Affected Packages

euvd pillow fix: 13.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Pillow's pure-Python PDF support lives in src/PIL/PdfParser.py, which parses indirect objects, the document catalog, and the page tree when an existing PDF is read for appending. The page tree is a graph of /Pages dictionaries whose /Kids arrays hold indirect references; the PDF specification treats it as a tree, but nothing prevents a crafted file from pointing multiple /Kids entries at the same child object or creating a cycle. Prior to the fix, linearize_page_tree() recursed into every kid without tracking which indirect object IDs had already been visited, so a small PDF with a shared or self-referencing subtree was flattened into an exponentially larger list of pages - the classic uncontrolled resource consumption pattern (CWE-400). The upstream commit 6f0e7ee1f9c2fe227906f8a4b926e6622b702bc7 threads a processed_ids set through the traversal, seeds it with self.pages_ref.object_id, and raises PdfFormatError("page tree contains a cyclic or duplicate reference to ...") when a kid object ID is seen twice; read_pdf_info() now calls linearize_page_tree() without a node argument so the duplicate-tracking root is always established. New regression tests in Tests/test_pdfparser.py cover both a two-node cycle and a root self-reference.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (CNA) PRIMARY 8.2 HIGH
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
vuln.today AI 5.9 MEDIUM

Remote unauthenticated DoS, but AC:H reflects the Attack Requirement that the app must process an attacker-controlled PDF via the append path; only availability is impacted (A:H, C/I:N).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (CNA).

CVSS VectorVendor

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
Patch available
Oct 21, 2026 - 22:03 EUVD
Analysis Updated
Oct 21, 2026 - 21:29 vuln.today
v2 - CVSS changed
CVSS changed
Oct 21, 2026 - 21:23 NVD
8.2 (HIGH)
CVE Published
Oct 21, 2026 - 19:14 oss-security
HIGH

Description PRE-NVD

Disclosed via oss-security. NVD scoring and full description are pending.

Technical POC Analysis

CWE-400 (Uncontrolled Resource Consumption), with CWE-407 (Inefficient Algorithmic Complexity) as the mechanism.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Pillow versions 5.1.0 through 12.x contain a high-severity denial-of-service flaw in the PDF append workflow that can exhaust CPU when a malformed PDF with repeatedly referenced /Pages /Kids nodes is processed via Image.save(..., format="PDF", append=True). Exposure is limited to applications that accept attacker-controlled PDFs and use append mode - ordinary image decoding and standalone PDF export are unaffected - so the primary risk is availability disruption in document-conversion pipelines rather than data compromise. No public exploit identified at time of analysis, but engineering teams should prioritize any internet-facing document processing service running the affected versions.

Business Impact: Medium
Compensating Controls

Disable PDF append mode (append=True) for untrusted inputs; reject or pre-validate PDFs with repeated or cyclic /Pages /Kids references; run document conversion in sandboxed, low-privilege workers with CPU and wall-clock limits; apply rate limiting and queue isolation; monitor for CPU exhaustion. Vendor advisory text indicates Pillow 13.0.0 fixes the issue, but the provided patch status is "NOT available" - verify with the vendor and upgrade once confirmed.

Threat Intelligence Overview

EPSS Score
0.4%
Top 65% exploitable
Prevalence
High
de facto Python imaging library, installed across a huge fraction of Python environments
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Medium

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy