Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft PDF with cyclic article bead chain (/N pointer loop)
-
DeliveryDeliver crafted PDF to merge-enabled pypdf application
-
ExploitApplication calls PdfWriter merge, invoking _add_articles_thread
-
ExecutionMethod traverses cyclic linked list without exit condition
-
PersistWorker process enters infinite loop, consuming CPU
-
ImpactApplication thread/process becomes unresponsive (DoS)
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 two concurrent conditions: (1) the target application must invoke pypdf's PDF merge functionality - specifically a code path that calls |
| Impact | The CVSS 4.0 score of 6.9 (Medium) with vector AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H accurately reflects that the impact is limited to availability (process hang) with no confidentiality or integrity consequences. The AV:L designation is appropriate because pypdf processes files on the local system, though in practice many deployments accept PDFs from network-facing upload endpoints, effectively elevating the realistic attack surface beyond a strict local interpretation. No EPSS score was provided in the input data, and there is no CISA KEV listing, indicating no confirmed widespread exploitation. However, the PR #3839 diff is publicly available and includes a working test case that explicitly constructs a cyclic article chain ( |
| Exploit ScenarioDerived | An attacker submits a crafted PDF to a web application or batch pipeline that uses pypdf to merge user-supplied documents - for example, a document management system or report generator. The PDF contains three article bead dictionaries where the last bead's |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 22, 2026
Infinite loop denial-of-service in pypdf prior to 6.13.1 allows an attacker to hang any process that merges a crafted PDF containing cyclic article/thread structures. The vulnerability exists in the _add_articles_thread() method of _writer.py, which traversed PDF article bead linked-list structures without cycle detection, permitting a self-referential /N (Next) pointer chain to create an irrecoverable loop. No public exploit code or CISA KEV listing exists at time of analysis, but the upstream PR diff publicly discloses the precise triggering structure, lowering the bar for exploitation against vulnerable merge pipelines.
RemediationAI
Upgrade pypdf to version 6.13.1 or later, available via PyPI (pip install --upgrade pypdf) and documented at https://github.com/py-pdf/pypdf/releases/tag/6.13.1. If an immediate upgrade is not feasible, the most actionable compensating control is to wrap all PdfWriter.merge() calls (or equivalent) in a subprocess or thread with a strict wall-clock timeout and kill the worker if it exceeds an expected processing duration - this bounds the DoS impact to a single request rather than a persistent hang. Alternatively, pre-screen incoming PDFs to detect the presence of /Threads entries in the document catalog before merging; rejecting or stripping thread structures from untrusted inputs eliminates the vulnerable code path entirely, though it may affect legitimate article-threaded documents. Do not rely on file size limits alone, as the cyclic structure is compact and size-based filters will not detect it.
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 (CPE: cpe:2.3:a:py-pdf:pypdf) is a pure-Python library for reading, writing, and merging PDF files. The PDF specification supports 'articles' - named reading sequences composed of linked 'bead' dictionaries connected via /N (Next) and /P (Previous) pointers. The _add_articles_thread() method in pypdf/_writer.py iterated through these bead dictionaries following /N pointers to clone and register each article during a merge operation. The method contained no visited-node tracking, embodying CWE-835 (Loop with Unreachable Exit Condition): a crafted PDF where the last bead's /N pointer references an earlier bead creates a circular linked list that the traversal loop can never exit. The fix (PR #3839) introduces a visited: set[int] tracking id(current_article) and raises LimitReachedError upon detecting a revisited node.
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:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Attacker delivers a crafted file processed locally by pypdf with no required privileges or separate user interaction; only availability is impacted via process hang.
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
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.13.1, an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires merging a file with threads/articles into a writer. This vulnerability is fixed in 6.13.1.
Blast Radius
ecosystem impact- 1 pypi packages depend on pypdf (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 6.13.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
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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
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
Denial of service in pypdf versions prior to 6.18.0 allows remote, unauthenticated attackers to stall PDF parsing by sup
Same technique Denial Of Service
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
EUVD-2026-38358
GHSA-g9xf-7f8q-9mcj
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB