GHSA-mrfp-p49p-3hf2
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted malformed PDF to app
-
ExploitInvoke Image.save PDF append on it
-
ExecutionShared /Pages subtree expands exponentially
-
ImpactCPU 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – 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)
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
Affected Packages
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
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
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).
Primary rating from Vendor (CNA).
CVSS VectorVendor
Lifecycle Timeline
4Description PRE-NVD
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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-107570
NVD
CVE.org
EPSS
VulDB
Exploit-DB