Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft PDF with cyclic /Outlines or /Parent structure
-
DeliverySubmit PDF to merge-capable endpoint
-
ExploitPdfWriter.merge() invokes _get_filtered_outline()
-
ExecutionCycle detection absent - loop runs indefinitely
-
PersistCPU resource exhaustion in worker
-
ImpactService denial for all users
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
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 the target application runs pypdf version earlier than 6.13.0 AND calls PdfWriter.merge() (or an equivalent merge workflow) on a PDF supplied by the attacker. The cyclic /Outlines path is triggered when the merged PDF's outline tree contains a circular reference - e.g., a node whose /Next or /First entry resolves to an ancestor already visited. A second, independent code path in _layout_mode_fonts() is triggered by cyclic /Parent page-hierarchy references during layout-mode text extraction, which is a distinct feature and reachable via a different API call. Exploitation is strictly limited to these two merge/extraction workflows; reading, decrypting, or extracting text from a crafted PDF via non-layout paths does not trigger the loop. Applications that do not ingest untrusted PDF files, or that perform no merge operations, are not exposed. |
| Impact | No CVSS score or vector was provided by NVD or the reporting source, and no EPSS data is available, so all severity signals must be inferred. The vulnerability is not listed in CISA KEV, and no public POC exploit code has been identified beyond what can be derived from the published patch diff. CWE-835 (infinite loop) is a DoS-only class - there is no code execution, memory corruption, or data exfiltration potential. Real-world risk is strongly deployment-context dependent: internet-facing services that accept untrusted PDF uploads and perform merge operations (document converters, form processors, report generators) face meaningful DoS exposure, while internal CLI tooling has low practical risk. The attack primitive - crafting a PDF with a cyclic outline structure - is low-complexity and replicable from the patch context alone, so treating the absence of a known POC as a strong mitigating factor would be an error. Priority should be moderate-to-high for any externally reachable pypdf merge deployment; low for isolated internal usage. |
| Exploit ScenarioDerived | An attacker uploads a crafted PDF file in which the /Outlines dictionary contains a node whose /Next entry points back to an ancestor, forming a cycle invisible to naive parsers. When a vulnerable pypdf application calls PdfWriter.merge() with this file, _get_filtered_outline() enters an infinite loop, consuming CPU until the worker process hangs or is killed by an OS-level resource limit. If the application does not enforce an operation timeout, repeated submissions can exhaust all worker threads or processes, resulting in a complete denial of service for all users. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 16, 2026
Processing crafted PDF outlines in pypdf versions prior to 6.13.0 triggers an infinite loop during writer merge operations, causing a denial of service. Applications that accept user-supplied PDFs and merge them using PdfWriter are affected - specifically any code path that calls merge() on a PDF whose /Outlines or /Parent hierarchy contains circular references. No public exploit has been identified at time of analysis and this is not listed in CISA KEV; a vendor-released patch is available as pypdf 6.13.0.
RemediationAI
Upgrade pypdf to version 6.13.0 or later using pip install 'pypdf>=6.13.0'; the release is confirmed at https://github.com/py-pdf/pypdf/releases/tag/6.13.0. If an immediate upgrade is not possible, the upstream fix from PR #3830 (https://github.com/py-pdf/pypdf/pull/3830) can be manually applied to the local installation - it adds a visited set of object IDs to _get_filtered_outline() in _writer.py and to _layout_mode_fonts() in _page.py to break cycles. As a compensating control, wrap merge operations in a subprocess or thread with a strict wall-clock timeout (e.g., concurrent.futures.ThreadPoolExecutor with a timeout, or subprocess with a timeout parameter) to bound the impact of an infinite loop; note this adds latency overhead and requires error handling for timeout exceptions. Additionally, restricting PDF merge endpoints to authenticated or trusted users reduces the attack surface when patching is delayed.
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 pure-Python PDF processing library (pip package: pkg:pip/pypdf) used to read, write, split, and merge PDF documents. The vulnerability class is CWE-835 (Loop with Unreachable Exit Condition). The PDF specification allows outline/bookmark nodes to be linked via /First, /Next, and /Last dictionary entries, and page objects to reference ancestors via /Parent entries. Prior to the fix, two traversal functions - _get_filtered_outline() in pypdf/_writer.py and _layout_mode_fonts() in pypdf/_page.py - iterated these linked structures without any cycle detection. A crafted PDF can embed circular references (e.g., an outline node whose /Next points back to an ancestor), causing the while loop to run indefinitely. The patch in PR #3830 introduces a visited set of object IDs in both traversal routines and breaks with a logged warning upon detecting a cycle, consistent with standard cycle-detection techniques for graph traversal.
Know when the next one hits your stack
- 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:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Worst-case assumes network-reachable merge endpoint with no authentication; only availability is impacted via infinite loop with no code execution possible.
Primary rating from Vendor (https://github.com/py-pdf/pypdf).
CVSS VectorVendor: https://github.com/py-pdf/pypdf
Lifecycle Timeline
1DescriptionCVE.org
Impact
An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires merging a file with outlines into a writer.
Patches
This has been fixed in pypdf==6.13.0.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #3830.
Blast Radius
ecosystem impact- 1 pypi packages depend on pypdf (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 6.13.0.
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.
EUVD-2026-38355
GHSA-m2v9-299j-rv96
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB