---
id: "CVE-2026-119209"
kind: "vulnerability"
aliases: ["CVE-2026-119209"]
title: "pypdf: crafted PDF can exhaust memory when opened"
severity: "high"
cvss: 7.1
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["document-processing", "package", "pypdf", "python"]
not_affected_if: ["pypdf-not-used", "trusted-input-only"]
published_at: "2026-10-29T21:17:20+00:00"
first_seen_at: "2026-10-29T21:26:51+00:00"
updated_at: "2026-10-29T21:28:37+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-119209", "first_seen_at": "2026-10-29T21:26:51+00:00"}]
---

# pypdf: crafted PDF can exhaust memory when opened

pypdf is a Python library for reading and writing PDF files. A crafted PDF with oversized cross-reference streams makes pypdf consume excessive memory while opening it, which can crash or stall the program.

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

## How to check

- Run `pip show pypdf` or `pip freeze | grep -i pypdf` and compare the installed version against `6.21.3`.
- Search your lock files and requirements for pypdf pins below `6.21.3`.

## Fix

- Upgrade pypdf to `6.21.3` or later.

## Timeline

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

## From the sources

pypdf is a free and open-source pure-python PDF library. Prior to 6.21.3, pypdf can consume excessive memory while opening a crafted PDF containing cross-reference streams that declare very large entry counts. Highly compressible streams and /Prev chains can multiply the number of parsed entries across a document, while negative /Index counts can bypass the existing per-stream clamp. This issue is fixed in version 6.21.3.

---

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