CVE-2026-59936

pypdf: Possible infinite loop for not terminated inline images

Published Jul 8, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.14.1, an attacker can craft a PDF with a page content stream containing a not terminated inline image, causing an infinite loop during inline image end marker detection such as when extracting page text. This issue is fixed in version 6.14.1.

Analysis

AI-generated

Technical impact

An improperly terminated inline image embedded in a PDF content stream causes the pypdf library to enter an infinite loop while scanning for the inline image end marker during operations such as text extraction. The loop continually consumes CPU time, which is inferred to lead to denial of service by rendering the PDF‑processing routine unresponsive, or eventually crashing the application. This weakness matches CWE‑400 (Uncontrolled Resource Consumption) and CWE‑835 (Infinite Loop).

Affected Systems

All installations of the pypdf library built by py‑pdf prior to release 6.14.1 are affected. Any software that reads or processes external PDFs using this library – including document viewers, report generators, and web services – must evaluate whether it incorporates a vulnerable version. Updating to release 6.14.1 or a later fix resolves the issue; older versions remain at risk.

Risk and Exploitability

The CVSS score of 8.7 indicates a high severity under the Common Vulnerability Scoring System. The EPSS score of less than 1 % suggests a low current exploitation probability, and the vulnerability is not listed in the CISA KEV catalog. Based on the description, an attacker simply needs to deliver a crafted PDF containing a non‑terminated inline image to a vulnerable application. No special privileges or complex prerequisites are required; successful exploitation results in a stuck or crashed PDF‑processing routine.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade pypdf to version 6.14.1 or later.
  • Isolate PDF processing in a sandboxed environment or disable the affected feature until the library can be updated.
  • Wrap PDF parsing calls in a timeout or CPU‑limit mechanism so that any infinite loop is terminated automatically.

Generated by OpenCVE AI on August 1, 2026 at 15:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-5xf7-4p34-54qr pypdf: Possible infinite loop for not terminated inline images
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': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-835
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/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.14.1, an attacker can craft a PDF with a page content stream containing a not terminated inline image, causing an infinite loop during inline image end marker detection such as when extracting page text. This issue is fixed in version 6.14.1.
Title pypdf: Possible infinite loop for not terminated inline images
Weaknesses CWE-400
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 9, 2026, 1:28 PM
Reserved
Jul 7, 2026, 6:20 PM
Status
Analyzed
Published
Jul 8, 2026, 8:16 PM
Modified
Nov 2, 2026, 4:06 PM
Severity
Moderate
Public date
Jul 8, 2026, 7:34 PM