Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft PDF with circular /Parent reference
-
DeliverySubmit PDF to target service
-
ExploitApplication calls layout-mode text extraction
-
Execution_layout_mode_fonts() enters infinite loop
-
PersistWorker process hangs indefinitely
-
ImpactService availability degraded or lost
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 conditions: (1) the target application must be using pypdf < 6.13.0 and must invoke text extraction with layout mode enabled (specifically the code path through |
| Impact | Real-world risk is moderate for services that accept untrusted PDF uploads and process them with layout-mode text extraction. The CVSS score is officially not assigned, but the attack requires no authentication, no special privileges, and only that the victim application invoke |
| Exploit ScenarioDerived | An attacker submits a crafted PDF to a document-processing web service that uses pypdf with layout-mode text extraction (e.g., a resume parser or invoice OCR endpoint). The PDF contains a circular |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 16, 2026
Infinite loop denial-of-service in pypdf allows an attacker to hang any Python application that processes a crafted PDF using layout-mode text extraction. The vulnerability arises because the /Parent hierarchy traversal in _layout_mode_fonts() lacked cycle detection, so a circular reference structure in a malicious PDF causes the parser to loop indefinitely. No active exploitation is confirmed (not in CISA KEV) and no public exploit code has been identified, but the attack surface is broad: any service accepting user-supplied PDFs and passing them to pypdf's layout-mode extraction is potentially affected.
RemediationAI
The primary fix is to upgrade pypdf to version 6.13.0 or later via pip install --upgrade 'pypdf>=6.13.0'. The release is available at https://github.com/py-pdf/pypdf/releases/tag/6.13.0. For environments where an immediate upgrade is not possible, the changes in PR #3830 (https://github.com/py-pdf/pypdf/pull/3830) can be applied as a manual patch to pypdf/_page.py and pypdf/_writer.py. As a compensating control without code changes, operators can disable layout-mode text extraction and fall back to the default extraction mode, which does not trigger the vulnerable traversal; this trades layout fidelity for safety. Additionally, enforcing a per-process CPU or wall-clock timeout (e.g., via signal.alarm on Linux or a subprocess watchdog) limits the blast radius of any infinite loop, at the cost of aborting legitimate long-running extractions. Restricting PDF upload endpoints to authenticated users reduces the unauthenticated attack surface but does not eliminate risk from malicious insiders or compromised accounts.
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 (pip package pypdf, formerly PyPDF2) is a pure-Python PDF manipulation library. The affected code path is pypdf/_page.py::_layout_mode_fonts(), which traverses the PDF page object tree via /Parent references to collect font resources for layout-mode text rendering. The PDF specification permits a tree of page dictionaries linked by /Parent pointers, but it does not inherently prevent circular references in a malformed or malicious file. Prior to the fix, the traversal loop had no visited-node tracking, so a crafted PDF embedding a cycle (e.g., page → dict2 → dict3 → page) would spin forever. The same pattern existed in _writer.py::_get_filtered_outline() for outline (bookmark) trees. The root cause is classified as CWE-835 (Loop with Unreachable Exit Condition / Infinite Loop). The fix in PR #3830 introduces a visited: set[int] guard using Python object identity (id()) to detect and break cycles, emitting a warning rather than raising an exception.
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
Network-deliverable crafted PDF requires no privileges; user/service interaction (UI:R) needed to process the file; pure availability impact from infinite loop.
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 extracting the text in layout mode.
Patches
This has been fixed in pypdf==6.13.0.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #3830.
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-38354
GHSA-52x6-gq3r-vpf4
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB