CVE-2026-27628

pypdf has a possible infinite loop when loading circular /Prev entries in cross-reference streams

Published Feb 25, 2026 CVSS 4.0 · 1.2 Low EPSS < 1% KEV · Not listed
Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.7.2, an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires reading the file. This has been fixed in pypdf 6.7.2. As a workaround, one may apply the patch manually.

Analysis

AI-generated

Technical impact

pypdf, a pure-Python PDF library, contains an infinite-loop vulnerability triggered when loading a PDF with circular /Prev entries in its cross-reference streams. An attacker who supplies such a crafted PDF can cause the library to loop indefinitely while reading the file, exhausting system resources and resulting in a denial-of-service condition. The weakness corresponds to CWE‑835 and only requires the ability to load a malicious PDF; no elevated privileges or local resources are needed.

Affected Systems

This issue affects any deployment of py-pdf:pypdf prior to version 6.7.2. Users running earlier releases, including those integrating pypdf into custom applications or data pipelines, are vulnerable whenever they process PDFs that may contain circular cross-reference references.

Risk and Exploitability

The vulnerability has a low CVSS score of 1.2 and an EPSS below 1 %, indicating rare exploitation. It is not listed in the CISA KEV catalog. The attack vector is inferred to be local or remote file load, as the malicious PDF must be loaded by the application; thus, exposure is limited to environments where untrusted PDFs are processed. Remedying the issue mitigates the risk of a denial-of-service event.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the library to pypdf 6.7.2 or later to eliminate the infinite-loop condition.
  • If an upgrade is not immediately possible, apply the patch commits referenced in the advisories (e.g., commit 0fbd9593 or f0a462d3) to the source before building the library.
  • Limit or sandbox any process that loads PDFs from untrusted sources, or replace pypdf with a more robust PDF parser that checks for circular cross-reference entries.

Generated by OpenCVE AI on April 16, 2026 at 16:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-2rw7-x74f-jg35 pypdf has a possible infinite loop when loading circular /Prev entries in cross-reference streams
History
Type Values Removed Values Added
CPEs cpe:2.3:a:pypdf_project:pypdf:*:*:*:*:*:*:*:* cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*
Vendors & Products Pypdf Project
Pypdf Project pypdf
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Pypdf Project
Pypdf Project pypdf
CPEs cpe:2.3:a:pypdf_project:pypdf:*:*:*:*:*:*:*:*
Vendors & Products Pypdf Project
Pypdf Project pypdf
Metrics cvssV3_1

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

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.7.2, an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires reading the file. This has been fixed in pypdf 6.7.2. As a workaround, one may apply the patch manually.
Title pypdf has a possible infinite loop when loading circular /Prev entries in cross-reference streams
Weaknesses CWE-835
References
Metrics cvssV4_0

{'score': 1.2, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U'}

Weaknesses
  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 27, 2026, 7:49 PM
Reserved
Feb 20, 2026, 10:02 PM
Status
Modified
Published
Feb 25, 2026, 3:16 AM
Modified
Nov 2, 2026, 4:06 PM
Severity
Moderate
Public date
Feb 25, 2026, 2:45 AM