Skip to main content

pypdf CVE-2026-59938

| EUVDEUVD-2026-42343 MEDIUM
Memory Allocation with Excessive Size Value (CWE-789)
2026-07-08 GitHub_M GHSA-5qjq-93h5-hrgp
6.9
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft PDF with inflated image size declarations
  2. Delivery
    Deliver PDF to target parsing endpoint
  3. Exploit
    pypdf parses image metadata
  4. Execution
    Allocates memory matching declared size
  5. Persist
    Host process memory exhausted
  6. Impact
    Service degradation or OOM condition

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
Exploitation Conditions

The only prerequisite is the ability to supply a crafted PDF to any code path that invokes pypdf's image parsing functionality. No authentication, account, or special privilege is required (PR:N per CVSS 4.0). No non-default configuration is needed - the vulnerable behavior occurs in the default image-parsing routine. Exploitation is limited to availability impact only; there is no known path to code execution or data exfiltration from this vulnerability alone. Applications that process only PDFs from trusted, internal sources are significantly less exposed. Versions 6.14.0 and later are not affected.

Impact

The CVSS 4.0 score of 6.9 (VA:L) reflects a moderate availability impact with no confidentiality or integrity dimension, consistent with a resource-exhaustion denial-of-service. The attack vector is network (AV:N), complexity is low (AC:L), and no privileges or user interaction are required (PR:N/UI:N), meaning any exposed parsing endpoint is reachable by an unauthenticated attacker. The VA:L rating (rather than VA:H) suggests the library does not necessarily crash the interpreter - sustained memory growth rather than immediate OOM kill is the expected behavior, though in memory-constrained environments the impact could escalate. EPSS data was not provided; without it, statistical exploitation probability cannot be quantified. The vulnerability is not in CISA KEV and no POC has been identified, placing real-world exploitation risk in the speculative range. The notable inconsistency: the source tags include 'Information Disclosure', yet the CVSS vector (VC:N/VI:N) confirms no confidentiality or integrity impact - that tag appears to be a mistagging or vendor artifact and should not influence risk decisions. For applications that accept PDF uploads from external users or parse PDFs in automated pipelines, this is a credible DoS vector and warrants prompt patching. For internal-only tooling processing trusted PDFs, risk is substantially lower.

Exploit ScenarioDerived

An attacker uploads or delivers a maliciously crafted PDF to a web application or automated pipeline that uses pypdf for document processing. The PDF contains image objects with declared size values in the gigabyte range but minimal actual data. When pypdf parses the image, it allocates memory proportional to the declared size, causing the host process to consume excessive RAM - potentially degrading or crashing the service for legitimate users. No exploit code has been publicly identified, but the attack requires only the ability to craft a PDF, which demands no specialized knowledge.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 08, 2026

Uncontrolled memory allocation in pypdf prior to 6.14.0 allows remote, unauthenticated attackers to exhaust host memory by submitting a crafted PDF containing image metadata with inflated declared sizes that vastly exceed the actual embedded image data. Any application that uses pypdf to parse untrusted PDFs is exposed; the library allocates memory proportional to the declared (attacker-controlled) size rather than the actual data length. No public exploit code has been identified and this vulnerability is not listed in the CISA KEV catalog at time of analysis.

RemediationAI

Upgrade pypdf to version 6.14.0 or later, which is the vendor-released patch addressing this issue (https://github.com/py-pdf/pypdf/releases/tag/6.14.0). The underlying fix is available in commit c64583be16b8e8763d8777075f8ecbf382014b7a and pull request #3888 (https://github.com/py-pdf/pypdf/pull/3888). If an immediate upgrade is not feasible, apply resource controls at the application layer: restrict the maximum file size of PDFs accepted for parsing, enforce per-request memory limits using Python resource limits or container cgroup controls, and run the parsing process in an isolated worker with a memory cap so that exhaustion kills only the worker rather than the host application. These workarounds add operational overhead and do not address the root cause; upgrade to 6.14.0 as soon as practicable.

Affected VersionsENISA

pypdf < 6.14.0

Affected Packages

pypi pypdf fix: 6.14.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pypdf (CPE: cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*) is a pure-Python library for reading, writing, and transforming PDF documents. The root cause is CWE-789 (Uncontrolled Memory Allocation): during image parsing, the library trusts the declared image dimension or buffer size values embedded in the PDF structure rather than bounding allocation against the actual compressed data size present in the stream. PDF image objects can declare arbitrary width/height or buffer-length values independently of the actual payload, and pypdf honored those declarations without validation, leading to allocation of arbitrarily large memory regions. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) confirms no special attack prerequisites beyond delivering a malformed PDF to a parsing endpoint.

Know when Pypdf gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.9 MEDIUM
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
vuln.today AI 5.3 MEDIUM

Network-delivered PDF, no auth or interaction needed; availability impact is low (memory exhaustion, not guaranteed crash); no confidentiality or integrity impact per description.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 5.3 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jul 08, 2026 - 19:01 EUVD

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Medium
widely used Python PDF library in document-processing applications
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Pypdf

View all
CVE-2026-119209 HIGH POC
7.1 Oct 29

Memory exhaustion while parsing crafted PDFs in pypdf versions prior to 6.21.3 allows an attacker to drive a consuming p

CVE-2026-119208 HIGH POC
7.1 Oct 29

Denial of service in pypdf before 6.21.3: retrieving the page count (for example via len(reader.pages) or get_num_pages(

CVE-2026-119207 HIGH POC
7.1 Oct 29

Memory exhaustion in the pypdf PDF library before 6.21.3 allows a small, deliberately malformed PDF dictionary to blow u

CVE-2026-119206 HIGH POC
7.1 Oct 29

pypdf before 6.21.3 can be driven into excessive CPU consumption when an application retrieves page labels from a specia

CVE-2026-119205 HIGH POC
7.1 Oct 29

Cloning or duplicating a crafted cyclic DictionaryObject with pypdf before 6.21.4 can hang the calling process in an inf

CVE-2026-119204 HIGH POC
7.1 Oct 29

Parsing a crafted PDF with pypdf before 6.21.4 can drive disproportionate memory consumption when the library enumerates

CVE-2026-119203 HIGH POC
7.1 Oct 29

Denial of service in pypdf prior to 6.21.4 lets remote attackers hang a PDF-processing thread by supplying an incomplete

CVE-2026-84309 MEDIUM POC
6.9 Sep 01

Infinite loop denial of service in pypdf prior to 6.16.0 allows any attacker who can supply a crafted PDF to a pypdf-bas

CVE-2026-54651 MEDIUM POC
6.9 Jun 22

Infinite loop denial-of-service in pypdf prior to 6.13.1 allows an attacker to hang any process that merges a crafted PD

CVE-2023-36810 MEDIUM POC
6.5 Jun 30

pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat

CVE-2023-36807 MEDIUM POC
6.5 Jun 30

pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat

CVE-2023-36464 MEDIUM POC
5.5 Jun 27

pypdf is an open source, pure-python PDF library. Rated medium severity (CVSS 5.5), this vulnerability is no authenticat

Vendor StatusVendor

SUSE

Severity: Moderate

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy