---
id: CVE-2026-59938
aliases:
  - GHSA-5qjq-93h5-hrgp
  - PYSEC-2026-3611
title: 'pypdf: Possible large memory usage for wrong image dimensions'
summary: 'pypdf: Possible large memory usage for wrong image dimensions'
severity: medium
vendor: pypdf
product: pypdf
ecosystem: pip
affected:
  - pypdf < 6.14.0
patched:
  - pypdf 6.14.0
published: '2026-07-23'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:51:10.495417380Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-5qjq-93h5-hrgp'
references:
  - url: 'https://github.com/py-pdf/pypdf/security/advisories/GHSA-5qjq-93h5-hrgp'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-59938'
  - url: 'https://github.com/py-pdf/pypdf/pull/3888'
  - url: >-
      https://github.com/py-pdf/pypdf/commit/c64583be16b8e8763d8777075f8ecbf382014b7a
  - url: 'https://github.com/py-pdf/pypdf'
  - url: 'https://github.com/py-pdf/pypdf/releases/tag/6.14.0'
  - url: 'https://github.com/advisories/GHSA-5qjq-93h5-hrgp'
tags:
  - osv
  - pip
  - ghsa
epss: 0.00515
epssPercentile: 0.41424
cwe:
  - CWE-789
ingestedAt: '2026-07-23T15:18:37.973Z'
---

## Overview

### Impact

An attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires loading images where the declared size values are much too large compared to the actual data.

### Patches

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

### Workarounds

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

## Affected packages

- `pypdf < 6.14.0`

## Remediation

Upgrade to a patched release:

- `pypdf 6.14.0`
