Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft PDF with inflated xref entry count
-
DeliveryDeliver file to PDF-processing service
-
Exploitpypdf parses standard xref table
-
ExecutionProcessing loops over phantom entries
-
ImpactExcessive CPU/runtime denial of service
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Excessive iteration
|
| Exploitation Conditions | Exploitation requires a vulnerable pypdf version (< 6.21.2) to open/parse an attacker-supplied PDF whose standard cross-reference table declares an entry count larger than the file can contain; the vendor fix adds a size check (declared size must not exceed stream_size // 20) that rejects such tables. The key limiting factor is UI:P - some application or user must actually process the malicious file, so the practical exposure is systems that ingest untrusted PDFs (upload portals, mail/attachment scanners, OCR/document pipelines). No authentication is required (PR:N), impact is limited to availability (no data exposure or modification), and the only complete fix stated by the vendor is upgrading to 6.21.2, with a workaround of applying the changes from PR #4239. |
| Impact | This is a denial-of-service issue (CWE-834, excessive iteration) in the pypdf library, not an exploitation-for-code-execution flaw. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H) correctly reflects availability-only impact with no confidentiality or integrity loss: a crafted cross-reference table declares an entry count larger than the file can actually contain, making pypdf iterate/process far more than warranted and consume excessive CPU time. Several signals point to moderate rather than urgent priority: there is no CISA KEV listing (not confirmed actively exploited), no EPSS score was provided in the input (exploitation probability cannot be quantified from the data), and the vuln.today decision label is 'this_week' rather than act_now/emergency. The exploitation requirement UI:P means an application or user must actually open/parse the malicious PDF, so this is not a wormable, fully-unattended network attack. The one notable caveat: the input Tags label this 'Information Disclosure,' which directly contradicts the CVSS vector (VC:N - no confidentiality impact) and the CWE - treat this as a resource-exhaustion/DoS issue, not disclosure. Overall this is a genuine but bounded availability risk, most relevant to services that ingest untrusted PDFs at scale. |
| Exploit ScenarioDerived | An attacker crafts a PDF whose standard cross-reference table declares an entry count far exceeding what the file size can hold, then submits it to any service or application that parses PDFs with a vulnerable pypdf version (e.g., an upload/OCR/document-processing pipeline). When the file is opened, pypdf spends excessive time processing the inflated table, tying up CPU and worker threads and degrading or denying service. No public, verified working exploit code was identified in the input; the referenced PR, commit, and release are the vendor fix, not an exploit. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 23, 2026
Denial of service in pypdf before 6.21.2: a crafted PDF whose standard cross-reference table declares a larger entry count than the file can physically contain drives the parser into excessive iteration and long runtimes simply when the document is opened. The CVSS vector shows no privileges required (PR:N) but a victim interaction of opening or processing the file (UI:P), so the realistic exposure is services that ingest untrusted PDFs such as upload portals, mail/attachment scanners and OCR or document pipelines. Impact is availability-only (no confidentiality or integrity effect), the vendor fix is version 6.21.2, and no public exploit code was identified at the time of analysis.
RemediationAI
Upgrade pypdf to 6.21.2 or later - the vendor states this is the fix and the release is available at https://github.com/py-pdf/pypdf/releases/tag/6.21.2 (GHSA-gmh7-3g9r-mjh5). If an immediate upgrade is not possible, the vendor's documented workaround is to backport the changes from PR #4239 (https://github.com/py-pdf/pypdf/pull/4239), specifically the new get_stream_size helper and the _read_standard_xref_table__handle_size check that rejects any declared xref entry count above the stream size divided by 20 bytes per entry. Be aware of the trade-off: the backport raises LimitReachedError on PDFs whose declared table size exceeds that limit, so calling code should catch and handle LimitReachedError (or the surrounding parse failure) rather than crash, and regression-test against your own PDF corpus, since deliberately malformed files that previously parsed slowly will now be rejected outright.
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 sits in its standard cross-reference table reader (_reader.py). After the 'xref' keyword the parser reads the declared subsection size and then walks that many entries; because the declared count was trusted without comparison to the actual amount of data in the stream, a header advertising an enormous number of entries forces the reader to keep iterating and parsing, producing CWE-834 (excessive iteration) and very long runtimes. The upstream fix adds a helper, _read_standard_xref_table__handle_size, backed by a new get_stream_size utility in _utils.py that uses getbuffer() where available and otherwise seeks to the end of the stream and restores the position. A valid entry occupies 20 bytes, so the declared size is now rejected with LimitReachedError when it exceeds stream_size // 20; non-integer or truncated sizes still fall back to the existing xref rebuild path. The accompanying tests exercise both the limit-triggering case and the pre-existing invalid-entry behaviour. Note that the intelligence tags label this 'Information Disclosure', which is inconsistent with the authoritative assessed impact - the vector carries VC:N/VI:N and only VA:H, so this is purely an availability issue and not an exposure of PDF contents.
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
Malicious PDF must be opened/parsed by the application (UI:R) with no auth (PR:N); impact is availability-only CPU exhaustion (A:H, C:N/I:N).
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.2, an attacker can craft a PDF with a standard cross-reference table whose declared entry count exceeds what the file can contain, causing excessive processing and long runtimes when the file is opened. This issue is fixed in version 6.21.2.
Blast Radius
ecosystem impact- 3,045 pypi packages depend on pypdf (2,087 direct, 1,000 indirect)
Ecosystem-wide dependent count for version 6.21.2.
Articles & Coverage 1
Technical POC Analysis
CWE-834 (Excessive Iteration).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity availability flaw in the pypdf library (versions before 6.21.2) allows a specially crafted PDF to stall processing simply when opened, potentially freezing document-ingestion services such as upload portals, mail/attachment scanners, and OCR pipelines. Impact is limited to availability-there is no confidentiality or integrity effect-but any organization running unpatched pypdf in untrusted-PDF workflows should treat this as a service-disruption risk requiring prompt remediation.
Apply vendor patch.
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-109129
GHSA-gmh7-3g9r-mjh5
NVD
CVE.org
EPSS
Exploit-DB