---
id: "CVE-2026-113789"
kind: "vulnerability"
aliases: ["CVE-2026-113789", "GHSA-6vvc-x485-93v7"]
title: "pypdf: Possible long runtimes/large memory usage when retrieving form fields"
severity: "medium"
cvss: 6.0
epss: 0.003169999923557043
exploited: false
status: "open"
category: "package"
products: [{"name": "pypdf", "fixed": ["6.21.0"], "affected": "< 6.21.0", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-400", "cwe-407", "document-processing", "file-upload", "package", "pypdf", "python"]
not_affected_if: ["no-form-field-retrieval", "no-untrusted-pdfs", "pypdf-below-affected-range"]
published_at: "2026-10-21T16:17:26+00:00"
first_seen_at: "2026-10-23T19:11:31+00:00"
updated_at: "2026-10-23T21:57:29+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-6vvc-x485-93v7", "first_seen_at": "2026-10-23T19:11:31+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113789", "first_seen_at": "2026-10-23T21:57:29+00:00"}]
---

# pypdf: Possible long runtimes/large memory usage when retrieving form fields

pypdf can be made to use a lot of memory or run for a very long time when code retrieves the form fields of a crafted PDF. An attacker who can get a malicious PDF processed by your app can cause slowdowns or memory exhaustion (denial of service).

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

## Affected

- pypi:pypdf affected < 6.21.0 fixed 6.21.0

## How to check

Run `pip show pypdf` or `pip freeze | grep -i pypdf` and check whether the version is below 6.21.0.
Search your code for calls that retrieve form fields (for example get_fields or get_form_text_fields) on untrusted PDFs.

## Fix

Upgrade pypdf to 6.21.0 or later (pip install -U "pypdf>=6.21.0").
If you cannot upgrade yet, apply the changes from PR #4219 in the pypdf repository.

## Timeline

- 2026-10-23T19:11:31+00:00 ghsa https://github.com/advisories/GHSA-6vvc-x485-93v7
- 2026-10-23T21:57:29+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-113789

## From the sources

### Impact

An attacker who uses this vulnerability can craft a PDF which leads to large memory usage and/or long runtimes. This requires retrieving the form fields of a document.

### Patches

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

### Workarounds

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

---

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