---
id: "CVE-2026-115580"
kind: "vulnerability"
aliases: ["CVE-2026-115580", "GHSA-gmh7-3g9r-mjh5"]
title: "pypdf: Possible long runtimes for large xref table header limits"
severity: "high"
cvss: 7.1
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "pypdf", "fixed": ["6.21.2"], "affected": "< 6.21.2", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-834", "document-processing", "package", "pypdf", "python", "self-hosted"]
not_affected_if: ["no-untrusted-pdf-input", "pypdf-below-6.21.2-not-installed"]
published_at: "2026-10-23T20:17:21+00:00"
first_seen_at: "2026-10-23T20:59:05+00:00"
updated_at: "2026-10-23T21:57:34+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-gmh7-3g9r-mjh5", "first_seen_at": "2026-10-23T20:59:05+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-115580", "first_seen_at": "2026-10-23T21:57:34+00:00"}]
---

# pypdf: Possible long runtimes for large xref table header limits

pypdf, a Python PDF library, can be made to run for a very long time when it opens a crafted PDF with a large or wrong upper limit in the xref table. An attacker who can get the application to parse such a file can tie up CPU and stall the process (denial of service).

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

## Affected

- pypi:pypdf affected < 6.21.2 fixed 6.21.2

## How to check

Run: pip show pypdf (or pip freeze | grep -i pypdf) and confirm the version is 6.21.2 or newer.
Search the lockfiles and requirements for pypdf to find every place it is pinned.

## Fix

Upgrade pypdf to 6.21.2 or newer: pip install --upgrade 'pypdf>=6.21.2'.
If you cannot upgrade yet, apply the changes from PR #4239 (https://github.com/py-pdf/pypdf/pull/4239).

## Timeline

- 2026-10-23T20:59:05+00:00 ghsa https://github.com/advisories/GHSA-gmh7-3g9r-mjh5
- 2026-10-23T21:57:34+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-115580

## From the sources

### Impact

An attacker who uses this vulnerability can craft a PDF which leads to long runtimes. This requires opening a file with large/wrong upper limits in the xref table.

### Patches

This has been fixed in [pypdf==6.21.2](https://github.com/py-pdf/pypdf/releases/tag/6.21.2).

### Workarounds

If you cannot upgrade yet, consider applying the changes from PR [#4239](https://github.com/py-pdf/pypdf/pull/4239).

---

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