CVE-2026-59935

pypdf: Possible infinite loop for not terminated inline images (ASCII85 and ASCIIHex filter)

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.2, an attacker can craft a PDF with a page content stream containing a not terminated inline image that uses the ASCII85 or ASCIIHex filters, causing an infinite loop during parsing such as when extracting page text. This issue is fixed in version 6.14.2.

Analysis

AI-generated

Technical impact

pypdf is a pure‑Python PDF library that contains a logic flaw which causes an infinite loop when parsing a page content stream that includes a not terminated inline image using the ASCII85 or ASCIIHex filters, as the loop never terminates. This flaw represents a CWE‑606 input validation weakness and a CWE‑835 infinite‑loop flaw, exposing the application to denial‑of‑service attacks.

Affected Systems

The pypdf package, published by py-pdf, is vulnerable in all releases older than 6.14.2. Any Python application that imports pypdf or processes PDFs using this library, such as web services or local tools, must upgrade to 6.14.2 or later.

Risk and Exploitability

The CVSS score of 8.7 indicates a high severity vulnerability. EPSS indicates an exploitation probability of less than 1 %. The likely attack vector is via malicious PDF inputs that an application processes, either locally or in a shared service. If an attacker can supply such PDFs, the infinite loop can be repeatedly triggered to consume resources, leading to service disruption or denial‑of‑service.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the pypdf package to version 6.14.2 or newer.
  • Pin the dependency to a non‑vulnerable pypdf version in your requirements file or lockfile to prevent accidental use of older releases.
  • Apply CPU or memory limits or sandbox the PDF parsing process to constrain resource usage and mitigate denial‑of‑service effects.

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-g867-7843-wf8q pypdf: Possible infinite loop for not terminated inline images (ASCII85 and ASCIIHex filter)
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
Weaknesses CWE-606
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
Metrics ssvc

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

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.2, an attacker can craft a PDF with a page content stream containing a not terminated inline image that uses the ASCII85 or ASCIIHex filters, causing an infinite loop during parsing such as when extracting page text. This issue is fixed in version 6.14.2.
Title pypdf: Possible infinite loop for not terminated inline images (ASCII85 and ASCIIHex filter)
Weaknesses CWE-835
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-606

    Unchecked Input for Loop Condition

  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 9, 2026, 1:36 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