Description
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.
Published: 2026-10-29
Score: 7.1 High
EPSS: n/a
KEV: No
Impact: Denial of Service
Action: Apply Patch
AI Analysis

Impact

pypdf, a popular pure‑Python PDF library, contains a flaw that can cause the parser to enter an infinite loop while searching for the trailer of a PDF that ends its cross‑reference table at EOF. This loop repeatedly rewinds to the same stream position and never terminates, leaving the thread that processes the PDF blocked and consuming CPU resources. The weakness is classified as CWE‑835, an improper termination of a loop or iteration, and the result is a denial of service, not a code‑execution or data‑leak vulnerability.

Affected Systems

All installations of py‑pdf's pypdf library that are older than version 6.21.4 are vulnerable. The fix is issued in release 6.21.4 and later versions. Applications that import and use pypdf—whether locally or as part of a web service—must ensure they are running a patched version to avoid exposure.

Risk and Exploitability

The CVSS score of 7.1 indicates a high‑severity flaw. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog, but the lack of a mitigated EPSS does not diminish the risk when the vulnerable library processes untrusted PDFs. An attacker can trigger the infinite loop by supplying a crafted incomplete PDF file to any code path that uses pypdf for parsing. Because the loop blocks the thread but does not exit the process, the attack can stall a single background worker or, in multi‑threaded environments, exhaust the pool of worker threads, leading to degraded performance or denial of service for legitimate users.

Generated by OpenCVE AI on October 29, 2026 at 22:04 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade pypdf to version 6.21.4 or newer in your production environment.
  • Implement a watchdog or isolate PDF parsing in a separate process to prevent a single infinite loop from blocking all workers.
  • Validate incoming PDF files for structural integrity before processing, and reject truncated or malformed files.

Generated by OpenCVE AI on October 29, 2026 at 22:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 29 Oct 2026 22:00:00 +0000

Type Values Removed Values Added
First Time appeared Py-pdf
Py-pdf pypdf
Vendors & Products Py-pdf
Py-pdf pypdf

Thu, 29 Oct 2026 20:45:00 +0000

Type Values Removed Values Added
Description 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.
Title pypdf: Possible infinite loop when hitting EOF in standard xref table during trailer search
Weaknesses CWE-835
References
Metrics cvssV4_0

{'score': 7.1, 'vector': '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-29T20:30:13.426Z

Reserved: 2026-10-29T16:04:48.729Z

Link: CVE-2026-119203

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-29T21:17:19.377

Modified: 2026-10-29T21:17:19.377

Link: CVE-2026-119203

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-29T22:15:04Z

Weaknesses
  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')