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

Source: https://junglewise.ai/threats/cve-2026-59936-py-pdf-pypdf-infinite-loop-in-inline-image-parsing  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-08. Updated: 2026-07-23  
License: CC BY 4.0 with a link back

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

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.

Technologies: [pypdf (PyPI)](https://junglewise.ai/threats/technologies/pypdf). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-59936 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-59936 being exploited in the wild.

**How severe is CVE-2026-59936?** High severity, with a CVSS score of 4, published 8 July 2026.

**Which products and versions are affected?** pypdf (PyPI) < 6.14.1, ECOSYSTEM:introduced=0,fixed=6.14.1.

**Is there a fix for CVE-2026-59936?** Yes. pypdf (PyPI): upgrade to 6.14.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-59936 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-59936?** Check whether you run pypdf (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- pypdf (PyPI): upgrade to 6.14.1 or later

  ```sh
  pip install "pypdf>=6.14.1"
  ```


## 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

## Identifiers

- CVE-2026-59936
- GHSA-5xf7-4p34-54qr
- PYSEC-2026-3612

## Timeline

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

## References

- [https://api.github.com/users/koltiradw](https://api.github.com/users/koltiradw)
- [https://github.com/koltiradw](https://github.com/koltiradw)
- [https://api.github.com/users/koltiradw/gists%7B/gist_id%7D](https://api.github.com/users/koltiradw/gists%7B/gist_id%7D)
- [https://api.github.com/users/koltiradw/repos](https://api.github.com/users/koltiradw/repos)
- [https://avatars.githubusercontent.com/u/44571881?v=4](https://avatars.githubusercontent.com/u/44571881?v=4)
- [https://api.github.com/users/koltiradw/events%7B/privacy%7D](https://api.github.com/users/koltiradw/events%7B/privacy%7D)

## Related threats

- [pypdf memory exhaustion in cross-reference stream parsing](https://junglewise.ai/threats/cve-2026-119209-pypdf-is-a-free-and-open-source-pure-python-pdf-library-prior-to)
- [pypdf denial of service via forged encrypted PDF page count](https://junglewise.ai/threats/cve-2026-119208-pypdf-is-a-free-and-open-source-pure-python-pdf-library-prior-to)
- [pypdf excessive memory consumption in strict mode PDF parsing](https://junglewise.ai/threats/cve-2026-119207-pypdf-is-a-free-and-open-source-pure-python-pdf-library-prior-to)
- [pypdf denial of service via crafted page labels](https://junglewise.ai/threats/cve-2026-119206-pypdf-is-a-free-and-open-source-pure-python-pdf-library-prior-to)
- [pypdf infinite loop in DictionaryObject cloning](https://junglewise.ai/threats/cve-2026-119205-pypdf-is-a-free-and-open-source-pure-python-pdf-library-prior-to)
