CVE-2026-113794

pypdf: Possible infinite loop when hitting EOF in standard xref table

Published Oct 21, 2026 CVSS 4.0 · 6 Medium EPSS < 1% KEV · Not listed
Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.20.0, an attacker can craft an incomplete PDF that ends inside a standard cross-reference table, causing pypdf to mishandle the unexpected end of file and enter an infinite loop. This issue is fixed in version 6.20.0.

Analysis

AI-generated

Technical impact

pypdf is a pure‑python PDF library that, prior to version 6.20.0, could be tricked into reading an incomplete PDF whose cross‑reference table stops abruptly at end‑of‑file. The library then incorrectly processes the incomplete table and falls into a never‑ending loop, exhausting the interpreter’s stack or CPU resources. The flaw is classified as CWE‑835, an infinite loop weakness that results in a denial of service rather than exploitation of integrity or confidentiality.

Affected Systems

The affects all installations using the py‑pdf:pypdf library with a version earlier than 6.20.0. No other vendors or product lines are listed as impacted.

Risk and Exploitability

The CVSS score of 6.0 places this issue in the medium severity range. EPSS data is not available, so the likely exploitation rate remains uncertain, but the fact that the flaw is triggered by an adversarial PDF makes it a practical risk for any application that parses PDFs from untrusted sources. The vulnerability is not listed in the CISA KEV catalog, which suggests no confirmed widespread exploitation yet. Attackers can feed a crafted PDF into any process that imports pypdf, potentially causing a service interruption.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the py-pdf:pypdf library to version 6.20.0 or newer.
  • Disable or remove pypdf usage in contexts that parse untrusted PDF files, or replace with a safer PDF parser.
  • Implement input validation or sandbox isolation for PDF processing to limit resource consumption, and monitor for abnormal CPU usage indicating a potential infinite loop.

Generated by OpenCVE AI on October 22, 2026 at 03:12 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-39mj-jf6j-2qj3 pypdf: Possible infinite loop when hitting EOF in standard xref table
History
Type Values Removed Values Added
CPEs cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:python:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Py-pdf
Py-pdf pypdf
Vendors & Products Py-pdf
Py-pdf pypdf
Type Values Removed Values Added
Description pypdf is a free and open-source pure-python PDF library. Prior to 6.20.0, an attacker can craft an incomplete PDF that ends inside a standard cross-reference table, causing pypdf to mishandle the unexpected end of file and enter an infinite loop. This issue is fixed in version 6.20.0.
Title pypdf: Possible infinite loop when hitting EOF in standard xref table
Weaknesses CWE-835
References
Metrics cvssV4_0

{'score': 6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 28, 2026, 1:20 AM
Reserved
Oct 20, 2026, 5:39 PM
Status
Analyzed
Published
Oct 21, 2026, 4:17 PM
Modified
Nov 2, 2026, 4:12 PM
Severity
Moderate
Public date
Oct 21, 2026, 3:59 PM