---
id: "CVE-2026-115585"
kind: "vulnerability"
aliases: ["CVE-2026-115585", "GHSA-jr96-gvgh-j3r4"]
title: "pypdf: Possible long runtimes for repeated malformed cross-reference entries (Follow-up)"
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-400", "cwe-407", "package", "pdf-processing", "pypdf", "python"]
not_affected_if: ["no-untrusted-pdfs"]
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-jr96-gvgh-j3r4", "first_seen_at": "2026-10-23T20:59:05+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-115585", "first_seen_at": "2026-10-23T21:57:34+00:00"}]
---

# pypdf: Possible long runtimes for repeated malformed cross-reference entries (Follow-up)

pypdf, a Python PDF library, can take a very long time to process a crafted PDF with repeated malformed cross-reference streams. An attacker who can get such a PDF processed can tie up the process and cause a 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

pip show pypdf

## Fix

Upgrade pypdf to 6.21.2 or later.
If upgrading is not possible yet, apply the changes from PR #4240 (https://github.com/py-pdf/pypdf/pull/4240).

## Timeline

- 2026-10-23T20:59:05+00:00 ghsa https://github.com/advisories/GHSA-jr96-gvgh-j3r4
- 2026-10-23T21:57:34+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-115585

## From the sources

### Impact

An attacker who uses this vulnerability can craft a PDF which leads to long runtimes. This requires cross-reference streams with repeated malformed cross-reference streams.

### 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 [#4240](https://github.com/py-pdf/pypdf/pull/4240).

### Notes

This is a follow-up to https://github.com/py-pdf/pypdf/security/advisories/GHSA-55h5-xmcq-c37v, which had the side-effect of still loading the whole stream again despite the cache being present.

---

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