Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft PDF with exponential DAG Form XObject structure
-
DeliverySubmit crafted PDF to pypdf-powered endpoint
-
ExploitTrigger _extract_text traversal
-
ExecutionExhaust worker CPU and memory
-
ImpactDeny service to legitimate users
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Excessive iteration
|
| Exploitation Conditions | The target application must call pypdf's |
| Impact | The provided CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VA:L, score 4.8) assigns local attack vector with user participation, which reflects a desktop tool usage pattern. For the more common deployment pattern - web services and data pipelines that automatically process user-uploaded PDFs - the effective attack vector is network with no meaningful user interaction required beyond a file upload, making the score a material understatement of real-world risk. No EPSS data was provided and the CVE carries no CISA KEV listing, meaning exploitation is not confirmed to be occurring. No public exploit code has been identified, though the attack primitive is straightforward for anyone with PDF format knowledge. The impact is limited to availability (CPU and memory exhaustion of the processing worker), with no confidentiality or integrity implications. Relative priority depends almost entirely on deployment context: operators running pypdf in automated, network-accessible ingestion pipelines against untrusted input should treat this as a meaningful availability risk; operators processing only trusted, internally-generated PDFs face essentially zero risk. |
| Exploit ScenarioDerived | An attacker constructs a PDF in which a root Form XObject invokes two named child XObjects, each of which in turn invokes the same grandchild XObject twice - a structure that is fully valid per the PDF specification. Submitting this PDF to a document ingestion API or file-processing service built on pypdf causes |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 01, 2026
Exponential traversal denial-of-service in pypdf before 6.16.1 allows an attacker who can supply a crafted PDF to cause severe CPU stalls and memory exhaustion in any application invoking PageObject._extract_text or PageObject.extract_xform_text. The text extraction routines previously detected only direct cycles via a known_ids set, but failed to bound the total number of XForm invocations across a directed acyclic graph where each parent node reuses the same child XObject multiple times, producing O(2^n) traversal paths for n levels. No active exploitation or public exploit code has been identified; the fix is confirmed available in version 6.16.1.
RemediationAI
Upgrade pypdf to version 6.16.1 or later (https://github.com/py-pdf/pypdf/releases/tag/6.16.1), which enforces a hard limit of 5,000 total XForm invocations per text extraction and adds depth and entry-count limits for outline traversal, eliminating the exponential blowup. If an immediate upgrade is not possible, consider running PDF text extraction in a subprocess or thread with a strict wall-clock timeout and memory ceiling (e.g., via resource.setrlimit(RLIMIT_AS, ...) on Linux or a concurrent.futures timeout) so that a stalled extraction cannot block the main application; be aware this introduces complexity around result handling. Pre-filtering PDFs by rejecting documents with abnormally high XObject counts using a lightweight structural scan (e.g., via pypdf.PdfReader without extracting text) is a possible compensating control but is difficult to calibrate reliably without the fix in place.
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
pypdf is a free, pure-Python PDF library (CPE: cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*) used to read, merge, and extract content from PDF files. PDF documents support Form XObjects - named, reusable graphical and content streams that can themselves reference other XObjects. The prior traversal logic in pypdf/_page.py maintained a known_ids set to prevent re-entering the exact same XObject on the current stack path (direct cycle detection), but this does not prevent a DAG structure where multiple distinct parent nodes each legitimately invoke the same child, causing the total number of traversal paths to grow exponentially with tree depth. CWE-834 (Excessive Iteration) covers this algorithmic complexity class, sometimes called a 'billion laughs' or ReDoS-analogue for tree walkers. The fix introduces a _TraversalState object carrying a global counter; once MAX_XFORM_INVOCATIONS_PER_EXTRACTION = 5,000 total XForm calls are reached for a single extraction, further XObjects are skipped with a warning. The same patch also adds OUTLINE_MAX_ENTRIES = 100,000 and OUTLINE_MAX_DEPTH = 100 guards to _doc_common.py to close a parallel outline-traversal vector.
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:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Network-reachable in typical web service deployments that auto-process uploaded PDFs; no auth or user interaction needed beyond submitting a file.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
pypdf is a free and open-source pure-python PDF library. Prior to 6.16.1, an attacker can craft a PDF that causes pypdf/_page.py PageObject._extract_text and PageObject.extract_xform_text to traverse a directed acyclic graph of reused form XObjects in which each form invokes a child multiple times, creating exponentially many traversal paths and causing long runtimes and large memory consumption. This issue is fixed in version 6.16.1.
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
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
Memory exhaustion in pypdf versions prior to 6.19.0 allows a remote, unauthenticated attacker to make an application una
Denial of service in pypdf versions prior to 6.19.0 allows an unauthenticated remote attacker to pin a PDF-processing wo
Denial of service in pypdf versions prior to 6.19.0 allows remote, unauthenticated attackers to exhaust application CPU
Denial of service in pypdf before 6.18.1 lets a crafted PDF drive the library's FlateDecode recovery path into inefficie
Memory exhaustion in pypdf versions prior to 6.18.1 lets a crafted PDF force the library to allocate and process far mor
Memory exhaustion in pypdf versions prior to 6.18.1 allows unauthenticated remote attackers to crash or degrade any appl
EUVD-2026-69607
GHSA-763m-79hh-57f2
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB