Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted PDF to pypdf-based service
-
DeliveryApplication enumerates reader.pages
-
ExploitPage-tree flattening copies many shared resource entries
-
ExecutionUnbounded allocations exhaust memory
-
ImpactDenial 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 that an application built on pypdf (versions prior to 6.21.4) parse an attacker-supplied PDF and access its page tree - specifically triggering _flatten()/page enumeration (e.g., len(reader.pages)), where page-tree flattening copies page dictionary and inherited resource entries. The crafted PDF must contain a page tree with many shared resource references (pages referenced multiple times, each copied per reference) so that total copied entries are disproportionate. The limiting factor is the passive user-interaction requirement (UI:P): the attacker cannot act purely remotely but must get the target to ingest the malicious document; impact is confined to memory exhaustion (availability only), with no confidentiality or integrity effect. Pre-fix there was no document-wide entry budget; the fix caps copied entries at 2,000,000 by default. |
| Impact | This is a genuine but bounded availability issue, not a critical priority. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H) correctly reflects a denial-of-service with no confidentiality or integrity impact: the only consequence is excessive memory consumption (CWE-400) during page-tree flattening. The UI:P (passive user interaction) element is the key tempering signal - exploitation requires the victim application to parse an attacker-supplied PDF, so this is not a self-propagating remote compromise but an abuse of a document-processing path. No EPSS score was provided in the input, and there is no CISA KEV listing, so exploitation status is 'no confirmed active exploitation'; the fix PR #4290 includes a reproducer test that constructs a crafted page tree, which demonstrates the mechanism but is not packaged standalone exploit code. The vuln.today 'this_week' decision label is consistent with a moderate-severity DoS in a widely-used library: worth patching promptly, but not an emergency. Net: a real, easily-triggered DoS against services that ingest untrusted PDFs, with impact limited to resource exhaustion rather than code execution or data exposure. |
| Exploit ScenarioDerived | An attacker uploads or submits a crafted PDF to an application or service that uses pypdf to process documents (e.g., an ingestion, preview, or extraction pipeline). When the application accesses the page collection, pypdf flattens a page tree containing many shared resource references, copying page-dictionary and inherited resource entries without a document-wide budget, causing disproportionate memory allocation and exhausting available memory. The fix PR contains a reproducer test demonstrating the crafted-page-tree trigger, but no standalone weaponized exploit was identified in the input. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 29, 2026
Parsing a crafted PDF with pypdf before 6.21.4 can drive disproportionate memory consumption when the library enumerates pages (for example len(reader.pages)), because page-tree flattening copies page dictionary and inherited resource entries without any document-wide budget. Any application that opens attacker-supplied PDFs and touches the page tree is affected, and the attacker must first convince the target to ingest the malicious document (user interaction is required by the assessed vector). There is no confirmed active exploitation and no verified working exploit code in the available sources; the vendor-shipped fix in 6.21.4 introduces a default cap of 2,000,000 copied page entries, making this a bounded availability issue rather than a critical priority.
RemediationAI
Vendor-released patch: pypdf 6.21.4 - upgrade to 6.21.4 or later (pip install 'pypdf>=6.21.4') and redeploy; per the advisory this is the complete fix. If immediate upgrade is not possible, the vendor-stated workaround is to backport and apply the changes from PR #4290 (https://github.com/py-pdf/pypdf/pull/4290), which introduces the page_tree_maximum_page_entries budget (default 2,000,000) and raises LimitReachedError when exceeded; the trade-off is that a lowered limit will also reject legitimately huge documents, while the default still permits a maximum of two million copied entries, so the memory ceiling it enforces is bounded but not tiny. Do not treat partial mitigations as equivalent to the upgrade - the advisory identifies patching, or applying the PR, as the remedy. Full details are in the advisory at https://github.com/py-pdf/pypdf/security/advisories/GHSA-cggf-277g-3q54 and the 6.21.4 release notes at https://github.com/py-pdf/pypdf/releases/tag/6.21.4.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
PDF documents organize pages in a tree of /Pages nodes whose /Kids arrays point to child nodes and, eventually, /Page leaf dictionaries. Attributes such as MediaBox and Resources are inherited down that tree, and a page may be referenced multiple times. pypdf's _doc_common.py flattening routine walks this tree and materializes a PageObject per leaf, copying the leaf dictionary plus any inherited attributes the page does not already define. Because the copy cost is per reference rather than per unique object, a crafted tree with many shared resource entries causes repeated, unbounded allocation. The root cause is CWE-400 (Uncontrolled Resource Consumption): no document-wide entry budget existed before the fix. The patch adds a Configuration value page_tree_maximum_page_entries (default 2,000,000) and a _TraversalState counter; _flatten_leaf_page decrements the budget by len(node) for indirect references and by the number of inherited attributes not already present, raising LimitReachedError once the budget goes negative. The added test builds a three-level tree with a 20,000-page Count and a leaf carrying 200 key entries, confirming the guard fires during flattening.
Know when Pypdf 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:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Remotely-supplied crafted PDF but the victim application must parse it (UI:R), no privileges needed, and impact is memory-exhaustion DoS only, so C:N/I:N/A:H.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
pypdf is a free and open-source pure-python PDF library. Prior to 6.21.4, pypdf can consume excessive memory while parsing a crafted PDF page tree containing many shared resources. Page-tree flattening copies page dictionary and inherited resource entries without a document-wide entry budget, allowing the crafted resource structure to cause disproportionate allocations. This issue is fixed in version 6.21.4.
Blast Radius
ecosystem impact- 547 pypi packages depend on pypdf (282 direct, 269 indirect)
Ecosystem-wide dependent count for version 6.21.4.
Technical POC Analysis
CWE-400: Uncontrolled Resource Consumption.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
A high-severity vulnerability in the pypdf library before version 6.21.4 enables memory exhaustion when processing malicious PDFs, potentially disrupting availability of internal document processing systems. The impact is limited to availability and requires user interaction to deliver the malicious PDF; no active exploitation has been observed. Leadership should prioritize remediation due to the potential for operational disruption if internal tools relying on pypdf ingest malicious documents.
Apply vendor patch.
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.
Memory exhaustion while parsing crafted PDFs in pypdf versions prior to 6.21.3 allows an attacker to drive a consuming p
Denial of service in pypdf before 6.21.3: retrieving the page count (for example via len(reader.pages) or get_num_pages(
Memory exhaustion in the pypdf PDF library before 6.21.3 allows a small, deliberately malformed PDF dictionary to blow u
pypdf before 6.21.3 can be driven into excessive CPU consumption when an application retrieves page labels from a specia
Cloning or duplicating a crafted cyclic DictionaryObject with pypdf before 6.21.4 can hang the calling process in an inf
Denial of service in pypdf prior to 6.21.4 lets remote attackers hang a PDF-processing thread by supplying an incomplete
Infinite loop denial of service in pypdf prior to 6.16.0 allows any attacker who can supply a crafted PDF to a pypdf-bas
Infinite loop denial-of-service in pypdf prior to 6.13.1 allows an attacker to hang any process that merges a crafted PD
pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat
pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat
pypdf is an open source, pure-python PDF library. Rated medium severity (CVSS 5.5), this vulnerability is no authenticat
Resource exhaustion in pypdf prior to 6.16.1 allows an attacker who can supply a crafted PDF to cause denial of service
EUVD-2026-113375
GHSA-cggf-277g-3q54
NVD
CVE.org
EPSS
Exploit-DB