Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.14.0, an attacker can craft a PDF with declared image size values that are much too large compared to the actual data, causing large memory usage in pypdf image parsing. This issue is fixed in version 6.14.0.
Published: 2026-07-08
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

pypdf is a widely used pure‑Python library for handling PDF files. The vulnerability arises when a PDF contains image metadata that specifies dimensions far larger than the actual image data bytes. During parsing, pypdf allocates memory in accordance with these declared dimensions, which can lead to excessive memory consumption or outright crashes. The weakness is categorized as CWE‑789, reflecting the adverse impact of improper memory allocation.

Affected Systems

The py‑pdf pypdf package is affected, specifically any released version older than 6.14.0. Users who import or otherwise process PDFs with these older releases are vulnerable. The problem was remedied in v6.14.0, and later releases contain the fix.

Risk and Exploitability

The CVSS score of 6.9 indicates a medium to high severity. The EPSS score of <1% suggests a very low likelihood of observed exploitation in the wild so far, but the absence of a public exploit does not preclude one. Based on the description, it is inferred that an attacker can supply a malicious PDF file that contains the oversized image metadata through common vectors such as email attachments, web forms accepting PDF uploads, or any application that automatically processes user‑supplied PDFs. Since the flaw does not require elevated privileges and relies solely on malformed input, it is likely exploitable in any environment that trusts unverified PDF files. The vulnerability is not listed in the CISA KEV catalog, indicating that it has not been reported as a known exploited vulnerability, yet organizations still should apply the fix or implement mitigations to prevent memory‑exhaustion attacks.

Generated by OpenCVE AI on July 29, 2026 at 13:47 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the pypdf package to version 6.14.0 or newer
  • Add a pre‑validation step that rejects PDF files whose declared image dimensions exceed a reasonable safety threshold
  • Configure process or container resource limits (e.g., ulimit, cgroups, or memory quotas) to contain potential memory exhaustion during PDF parsing

Generated by OpenCVE AI on July 29, 2026 at 13:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-5qjq-93h5-hrgp pypdf: Possible large memory usage for wrong image dimensions
History

Sat, 11 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-770
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

threat_severity

Moderate


Thu, 09 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 08 Jul 2026 18:45:00 +0000

Type Values Removed Values Added
First Time appeared Py-pdf
Py-pdf pypdf
Vendors & Products Py-pdf
Py-pdf pypdf

Wed, 08 Jul 2026 17:30:00 +0000

Type Values Removed Values Added
Description pypdf is a free and open-source pure-python PDF library. Prior to 6.14.0, an attacker can craft a PDF with declared image size values that are much too large compared to the actual data, causing large memory usage in pypdf image parsing. This issue is fixed in version 6.14.0.
Title pypdf: Possible large memory usage for wrong image dimensions
Weaknesses CWE-789
References
Metrics cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-09T13:58:17.678Z

Reserved: 2026-07-07T18:20:06.127Z

Link: CVE-2026-59938

cve-icon Vulnrichment

Updated: 2026-07-09T13:58:13.230Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-08T17:24:29Z

Links: CVE-2026-59938 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-29T14:00:03Z

Weaknesses
  • CWE-770

    Allocation of Resources Without Limits or Throttling

  • CWE-789

    Memory Allocation with Excessive Size Value