Junglewise Threat Intelligence

CVE-2026-59936: py-pdf pypdf infinite loop in inline image parsing

CVE-2026-59936 · Severity: high · CVSS 8.7 · Published 2026-07-08

Executive brief

pypdf is a widely used Python library for manipulating and extracting data from PDF files. A vulnerability has been identified where a specially crafted PDF file can cause the library to enter an infinite loop during processing. This can lead to a denial-of-service (DoS) condition, causing applications that process user-uploaded PDFs to hang or crash, potentially impacting service availability.

Technical details

A vulnerability exists in pypdf due to improper handling of inline images within a PDF content stream. Specifically, if an inline image is not properly terminated, the parser may enter an infinite loop (CWE-835) while attempting to process the stream, such as during text extraction. This is a resource consumption issue (CWE-400) that can be triggered remotely without authentication if the target application processes untrusted PDF files. The issue is resolved in version 6.14.1 by improving the termination logic for inline image parsing.

Affected products

  • py-pdf pypdf < 6.14.1

Timeline

  • 2026-06-23: disclosed
  • 2026-06-23: patched: Fix released in version 6.14.1
  • 2026-07-23: advisory

References

Related threats