---
id: "CVE-2026-113795"
kind: "vulnerability"
aliases: ["CVE-2026-113795", "GHSA-7mh2-4gg2-979f"]
title: "pypdf: Possible large memory usage for streams with multiple filters"
severity: "medium"
cvss: 6.0
epss: 0.004660000093281269
exploited: false
status: "open"
category: "package"
products: [{"name": "pypdf", "fixed": ["6.20.0"], "affected": "< 6.20.0", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-400", "cwe-770", "document-processing", "package", "pypdf", "python"]
not_affected_if: ["only-trusted-pdfs", "pypdf-not-used"]
published_at: "2026-10-21T16:17:28+00:00"
first_seen_at: "2026-10-23T19:11:32+00:00"
updated_at: "2026-10-23T21:57:29+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-7mh2-4gg2-979f", "first_seen_at": "2026-10-23T19:11:32+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113795", "first_seen_at": "2026-10-23T21:57:29+00:00"}]
---

# pypdf: Possible large memory usage for streams with multiple filters

pypdf, a Python PDF library, can be made to use large amounts of memory when parsing a stream with many or large chained filters. An attacker who supplies a crafted PDF can exhaust memory in the process that reads it.

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

## Affected

- pypi:pypdf affected < 6.20.0 fixed 6.20.0

## How to check

pip show pypdf or pip freeze | grep -i pypdf, and check whether the version is below 6.20.0.

## Fix

Upgrade pypdf to 6.20.0 or later. If you cannot upgrade, apply the changes from PR #4173 in the pypdf repository.

## Timeline

- 2026-10-23T19:11:32+00:00 ghsa https://github.com/advisories/GHSA-7mh2-4gg2-979f
- 2026-10-23T21:57:29+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-113795

## From the sources

### Impact

An attacker who uses this vulnerability can craft a PDF which leads to large memory consumption. This requires accessing any stream with a large amount of filters or multiple filters which pass around large amounts of data.

### Patches

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

### Workarounds

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

---

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