CVE-2026-59935
Received Received - Intake

Infinite Loop in PyPDF Due to Unterminated Inline Image

Vulnerability report for CVE-2026-59935, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-08

Last updated on: 2026-07-08

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-08
Last Modified
2026-07-08
Generated
2026-07-09
AI Q&A
2026-07-09
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
py_pdf pypdf to 6.14.2 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-835 The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Compliance Impact

The provided information does not specify any direct impact of this vulnerability on compliance with common standards and regulations such as GDPR or HIPAA.

Executive Summary

The vulnerability in pypdf (before version 6.14.2) involves the handling of PDF files containing inline images that use ASCII85 or ASCIIHex filters but have unterminated or incomplete streams.

When such a crafted PDF is parsed, for example during page text extraction, the library enters an infinite loop because it cannot properly detect the end of the inline image stream.

This infinite loop causes the program to hang, leading to a denial of service condition.

The issue was fixed in version 6.14.2 by adding safeguards to detect and handle these incomplete or truncated image streams properly.

Impact Analysis

This vulnerability can cause denial of service by making the pypdf library enter an infinite loop when processing maliciously crafted PDF files.

If your application uses pypdf to extract text or otherwise parse PDFs, an attacker could supply a specially crafted PDF that causes your application to hang indefinitely.

This can lead to resource exhaustion, degraded service availability, or application crashes, impacting reliability and user experience.

Detection Guidance

This vulnerability occurs when pypdf processes a crafted PDF containing an unterminated inline image stream using ASCII85 or ASCIIHex filters, causing an infinite loop during parsing.

Detection involves identifying PDF files that contain incomplete or truncated inline images with ASCII85 or ASCIIHex encoding that cause the pypdf library to hang or enter an infinite loop during text extraction.

Since the issue manifests during PDF parsing, you can attempt to extract text from suspicious PDF files using pypdf versions prior to 6.14.2 and observe if the process hangs or loops indefinitely.

No specific commands are provided in the resources, but a practical approach is to run a script that uses pypdf to extract text from PDFs and monitor for processes that do not complete or consume excessive CPU.

Mitigation Strategies

The primary mitigation is to upgrade the pypdf library to version 6.14.2 or later, where the vulnerability has been fixed.

If upgrading is not immediately possible, users can apply the patch from pull request #3892 which adds safeguards to prevent infinite loops when processing incomplete ASCII85 and ASCIIHex inline images.

Avoid processing untrusted or suspicious PDF files that may contain malformed inline images until the fix is applied.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-59935. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart