---
id: "CVE-2026-119203"
kind: "vulnerability"
aliases: ["CVE-2026-119203"]
title: "pypdf: crafted incomplete PDF causes infinite loop when opened"
severity: "high"
cvss: 7.1
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["package", "pypdf", "python"]
not_affected_if: ["no-untrusted-pdf-input", "pypdf-below-6.21.4-absent"]
published_at: "2026-10-29T21:17:19+00:00"
first_seen_at: "2026-10-29T21:26:51+00:00"
updated_at: "2026-10-29T21:28:42+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-119203", "first_seen_at": "2026-10-29T21:26:51+00:00"}]
---

# pypdf: crafted incomplete PDF causes infinite loop when opened

pypdf, a pure-Python PDF library, can hang forever when it opens a crafted PDF whose cross-reference table reaches end of file without a trailer. The stuck processing thread blocks the application, which is a denial of service.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed pypdf version with `pip show pypdf` or `python -c "import pypdf; print(pypdf.__version__)"`
- Search dependency lock files (requirements.txt, poetry.lock, uv.lock) for pypdf versions below `6.21.4`
- Find code paths that open untrusted PDF uploads with pypdf

## Fix

- pypdf: upgrade to `6.21.4`

## Timeline

- 2026-10-29T21:26:51+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-119203

## From the sources

pypdf is a free and open-source pure-python PDF library. Prior to 6.21.4, pypdf can enter an infinite loop while opening a crafted incomplete PDF whose standard cross-reference table reaches the end of the file without a trailer. The trailer search can repeatedly rewind to the same stream position instead of terminating when parsing makes no progress, blocking the processing thread. This issue is fixed in version 6.21.4.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
