Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft truncated PDF with xref table and no trailer
-
DeliveryDeliver to service parsing untrusted PDFs
-
ExploitApplication calls pypdf PdfReader to open file
-
ExecutionTrailer search rewinds repeatedly to same position
-
ImpactProcessing thread loops indefinitely (denial of service)
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 open and parse an attacker-supplied PDF using pypdf prior to 6.21.4, and specifically a crafted INCOMPLETE PDF whose standard cross-reference (xref) table reaches end-of-file WITHOUT a trailer - this is the exact condition under which the trailer search rewinds to the same stream position and never terminates. The limiting factor is passive interaction (UI:P): the attacker needs the file to be ingested by pypdf (e.g. an upload/document-processing path), but no authentication, no special privileges, and no non-default configuration are required - pypdf's default parsing path is affected. Impact is confined to availability (a hung processing thread) on the system doing the parsing; there is no confidentiality or integrity effect. |
| Impact | This is a denial-of-service vulnerability (CWE-835, uncontrolled infinite loop) in the pypdf library, not a code-execution or data-exposure flaw. The vendor-supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N, score 7.1) is internally consistent with the description: availability-only impact (VA:H, with VC:N/VI:N), low complexity, no privileges, but passive user/application interaction (UI:P) is required because the attacker cannot trigger the loop until a crafted incomplete PDF is actually opened by pypdf. No EPSS score and no KEV status were provided in the input, and the vulnerability is not listed in CISA KEV, so there is no signal of active exploitation; exploitation status is 'no public exploit identified at time of analysis', though the upstream fix includes a minimal crafted-PDF regression test that reliably reproduces the hang. No SSVC exploitation/automatable/technical-impact decision values were supplied; the only priority signal is the vuln.today 'this_week' label, consistent with a patchable availability bug rather than an emergency. Realistically this is a moderate-priority issue: trivially triggerable where untrusted PDFs are parsed server-side (e.g. document-processing pipelines), but the worst outcome is a stuck processing thread, not compromise. The ceiling is bounded by impact being availability-only on the processing system. |
| Exploit ScenarioDerived | An attacker submits a specially crafted, truncated PDF whose standard cross-reference table reaches end-of-file without a trailer to a service that parses uploaded documents with pypdf (< 6.21.4). When pypdf opens the file, the trailer search rewinds to the same stream position without making progress and loops indefinitely, pinning the thread handling that request. No working weaponized exploit is published, but the fix's regression test (b"%PDF-1.4\nstartxref\n28\n%%EOF\nxref\n1 0\naaa") is a minimal trigger that demonstrates the hang. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 29, 2026
Denial of service in pypdf prior to 6.21.4 lets remote attackers hang a PDF-processing thread by supplying an incomplete PDF whose standard cross-reference table runs to end-of-file without a trailer; the trailer search rewinds to the same stream position indefinitely instead of terminating, and the affected code is pypdf's default parsing path rather than an optional configuration. No authentication or privileges are required, only that the target application ingests the attacker-supplied file (passive user interaction), and impact is limited to availability - a single stuck worker thread with no confidentiality or integrity effect. The flaw is fixed in 6.21.4; no public exploit code and no confirmed active exploitation were identified at time of analysis.
RemediationAI
Vendor-released patch: upgrade to pypdf 6.21.4 (pip install 'pypdf>=6.21.4'), the version in which the repeated-position check is present, as documented in advisory GHSA-5849-834g-hvw5 and release tag 6.21.4. If an upgrade cannot be scheduled immediately, the vendor's stated workaround is to apply the changes from PR #4289 (https://github.com/py-pdf/pypdf/pull/4289), which adds the previous_position tracking in _read_standard_xref_table and raises PdfReadError when the parser rewinds to an already-seen offset; note that this is a source-level backport the vendor points to rather than a tagged release, so the patched code must be maintained in your own fork or vendored copy. Rollout should prioritize internet-facing document ingestion paths, where an unauthenticated party can supply the crafted file and block a processing thread.
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 library, and the flaw lives in the standard (non-stream) cross-reference table reader in pypdf/_reader.py. When a PDF lacks a usable trailer, the parser scans for the b"trailer" tag; on failing to find it, the code rewinds the stream by seven bytes (stream.seek(-7, 1)) to pick up further xref sections. On a malformed, truncated file where the xref table reaches EOF without a trailer, that rewind returns the parser to a position it has already visited, so parsing makes no forward progress and the loop never terminates - the CWE-835 (Loop with Unreachable Exit Condition) class. The upstream fix (PR #4289, commit 06593f993789a4b573dd955730c1a7051128bb2a) records the position after each rewind in a previous_position variable and raises PdfReadError when the position repeats, e.g. "Xref parsing stuck at position 33: b'aaa'", converting an unbounded hang into a clean parse failure. The trigger is specifically an incomplete standard xref table without a trailer; the sources do not describe behavior for xref streams, encrypted documents, or other parser paths, and those are unverified. The CVSS 4.0 vector rates availability High with passive user interaction (UI:P) and no privileges (PR:N); the independent assessment maps this to CVSS 3.1 AV:N/AC:L/PR:N/UI:R with A:H and no C/I impact.
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
Remote crafted PDF, low complexity, no privileges, but requires the victim application to open the file (UI:R); impact is availability-only (A:H), no confidentiality or integrity effect.
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 enter an infinite loop while opening a crafted incomplete PDF whose standard cross-reference table reaches the end of the file without a trailer. The trailer search can repeatedly rewind to the same stream position instead of terminating when parsing makes no progress, blocking the processing thread. 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-835: Loop with Unreachable Exit Condition ("Infinite Loop").
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 denial-of-service vulnerability in the pypdf library (versions prior to 6.21.4) enables remote attackers to indefinitely hang PDF-processing threads by supplying a malformed PDF. This affects any application that ingests untrusted PDFs using the default parsing path, potentially causing service disruptions and resource exhaustion. Leadership should prioritize remediation to maintain availability of document-processing workflows.
No vendor-released patch identified at time of analysis; interim mitigations include restricting ingestion of untrusted PDFs, implementing timeouts and resource limits on PDF-processing threads, and isolating PDF processing in sandboxed environments to prevent thread hangs from impacting critical services.
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
Parsing a crafted PDF with pypdf before 6.21.4 can drive disproportionate memory consumption when the library enumerates
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-113374
GHSA-5849-834g-hvw5
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB