Skip to main content

pypdf CVE-2026-115580

| EUVDEUVD-2026-109129 HIGH
Excessive Iteration (CWE-834)
2026-10-23 GitHub_M GHSA-gmh7-3g9r-mjh5
7.1
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft PDF with inflated xref entry count
  2. Delivery
    Deliver file to PDF-processing service
  3. Exploit
    pypdf parses standard xref table
  4. Execution
    Processing loops over phantom entries
  5. Impact
    Excessive 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

pypdf < 6.21.2

Affected Packages

pypi pypdf fix: 6.21.2

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

Vendor (GitHub_M) PRIMARY 7.1 HIGH
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
vuln.today AI 6.5 MEDIUM

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).

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Oct 23, 2026 - 20:03 EUVD
CVE Published
Oct 23, 2026 - 19:29 cve.org
HIGH 7.1

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 3,045 pypi packages depend on pypdf (2,087 direct, 1,000 indirect)

Ecosystem-wide dependent count for version 6.21.2.

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

Why It Matters

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.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 56% exploitable
Prevalence
Medium
popular pure-python PDF library, common in document pipelines but not ubiquitous
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
Medium

Priority Score

37
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

More in Pypdf

View all
CVE-2026-84309 MEDIUM POC
6.9 Sep 01

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

CVE-2026-54651 MEDIUM POC
6.9 Jun 22

Infinite loop denial-of-service in pypdf prior to 6.13.1 allows an attacker to hang any process that merges a crafted PD

CVE-2023-36810 MEDIUM POC
6.5 Jun 30

pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat

CVE-2023-36807 MEDIUM POC
6.5 Jun 30

pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat

CVE-2023-36464 MEDIUM POC
5.5 Jun 27

pypdf is an open source, pure-python PDF library. Rated medium severity (CVSS 5.5), this vulnerability is no authenticat

CVE-2026-84310 MEDIUM POC
4.8 Sep 01

Resource exhaustion in pypdf prior to 6.16.1 allows an attacker who can supply a crafted PDF to cause denial of service

CVE-2026-103000 HIGH
8.7 Sep 30

Memory exhaustion in pypdf versions prior to 6.19.0 allows a remote, unauthenticated attacker to make an application una

CVE-2026-102999 HIGH
8.7 Sep 30

Denial of service in pypdf versions prior to 6.19.0 allows an unauthenticated remote attacker to pin a PDF-processing wo

CVE-2026-102998 HIGH
8.7 Sep 30

Denial of service in pypdf versions prior to 6.19.0 allows remote, unauthenticated attackers to exhaust application CPU

CVE-2026-102997 HIGH
8.7 Sep 30

Denial of service in pypdf before 6.18.1 lets a crafted PDF drive the library's FlateDecode recovery path into inefficie

CVE-2026-102996 HIGH
8.7 Sep 30

Memory exhaustion in pypdf versions prior to 6.18.1 lets a crafted PDF force the library to allocate and process far mor

CVE-2026-102995 HIGH
8.7 Sep 30

Memory exhaustion in pypdf versions prior to 6.18.1 allows unauthenticated remote attackers to crash or degrade any appl

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy