Skip to main content

pypdf EUVDEUVD-2026-40425

| CVE-2026-57204 MEDIUM
Uncontrolled Resource Consumption (CWE-400)
2026-06-30 security-advisories@github.com
6.9
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Craft PDF with /Length-less content stream
  2. Delivery
    Deliver PDF to pypdf-consuming application
  3. Exploit
    Application invokes pypdf content stream parser
  4. Execution
    MAX_DECLARED_STREAM_LENGTH bypass triggers unbounded memory allocation
  5. Impact
    Memory exhaustion degrades or crashes target process

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application pass an attacker-supplied PDF to pypdf's parser - for example, via a web file upload endpoint, an email attachment processor, a document conversion service, or a pipeline that fetches remote PDFs. The specific triggering condition is a PDF whose content stream omits the /Length dictionary entry; this particular omission bypasses the MAX_DECLARED_STREAM_LENGTH guard. Applications that parse only internally generated or cryptographically verified PDFs are not at risk. Per the CVSS 4.0 vector (PR:N/UI:N), no authentication or user interaction is required from the attacker once a delivery path to the parser exists. Exploitation is limited to availability impact only - no confidentiality or integrity compromise is described.

Impact

The CVSS 4.0 vector AV:N/AC:L/AT:N/PR:N/UI:N reflects a low-complexity, unauthenticated, network-reachable attack - any application that accepts attacker-controlled PDFs can be targeted without special conditions. Availability impact is rated VA:L (low), suggesting partial degradation rather than guaranteed full crash, though in practice uncontrolled memory growth on constrained hosts can escalate to OOM termination. No EPSS data was provided in the input, so exploitation probability cannot be quantified. Neither a CISA KEV listing nor public PoC code was identified, placing this in a theoretical-risk category at time of analysis. The realistic priority is moderate for applications in document-processing pipelines, low-upload-trust environments, or shared infrastructure where one tenant can starve resources for others; risk is negligible for applications parsing only trusted, internally generated PDFs.

Exploit ScenarioDerived

An attacker submits a crafted PDF file - containing a content stream with no /Length field - to a web application or automated document processor built on pypdf. When pypdf parses the stream, it allocates memory without bound, progressively exhausting available RAM. On shared or memory-constrained hosts this can trigger OOM kills affecting other tenants or services. No public PoC has been identified, but the attack is straightforward to construct given the detailed patch description.

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 – Jun 30, 2026

Memory exhaustion in pypdf prior to 6.13.3 allows unauthenticated remote attackers to cause denial of service by supplying a maliciously crafted PDF. The MAX_DECLARED_STREAM_LENGTH safety cap - designed to bound memory allocation during stream parsing - is bypassed when a PDF content stream omits the /Length value, enabling unbounded memory growth. No active exploitation is confirmed (not in CISA KEV), but the attack surface encompasses any Python application that parses attacker-supplied PDFs, a common pattern in document pipelines and web upload handlers.

RemediationAI

Upgrade pypdf to version 6.13.3 or later, which enforces MAX_DECLARED_STREAM_LENGTH even when a content stream lacks a /Length entry; the patch and release notes are available at https://github.com/py-pdf/pypdf/releases/tag/6.13.3. If an immediate upgrade is not feasible, run PDF parsing in a subprocess with explicit OS-level memory limits (e.g., Python's resource.setrlimit with RLIMIT_AS, or cgroup memory constraints) so that a single malformed document cannot exhaust host memory - note this adds process-management overhead and does not fix the root cause. Additionally, applying upstream file-size and structural validation (rejecting PDFs above a reasonable size threshold before parsing) can reduce exposure. These workarounds carry operational complexity and are not substitutes for patching.

Affected VersionsENISA

pypdf < 6.13.3

Affected Packages

pypi pypdf fix: 6.13.3

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 is a pure-Python PDF parsing library distributed via PyPI. PDF streams normally declare their size via a /Length dictionary entry, which pypdf uses alongside the internal constant MAX_DECLARED_STREAM_LENGTH to cap memory allocation during content stream parsing. CWE-400 (Uncontrolled Resource Consumption) captures the root cause: when a PDF stream lacks /Length entirely, the code path enforcing MAX_DECLARED_STREAM_LENGTH is not reached, and the parser allocates memory proportional to the actual (unbounded) stream content. This is a classic parser resource exhaustion pattern where a missing field disables a safety guard rather than triggering a rejection.

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) 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

Unauthenticated network-reachable delivery (PR:N, AV:N, AC:L); availability impact rated L consistent with partial memory exhaustion rather than a guaranteed full-crash outcome per CVSS 4.0 VA:L signal.

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
Red Hat 6.5 MEDIUM

Primary rating from Vendor (github).

CVSS VectorVendor: github

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
Jun 30, 2026 - 23:01 EUVD

DescriptionCVE.org

pypdf is a free and open-source pure-python PDF library. Prior to 6.13.3, a maliciously crafted PDF can cause DoS. An attacker who uses this vulnerability can craft a PDF which leads to large memory usage, as MAX_DECLARED_STREAM_LENGTH is sometimes ignored. This requires parsing a content stream without a /Length value. This issue has been fixed in version 6.13.3.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 7 pypi packages depend on pypdf (7 direct, 0 indirect)

Ecosystem-wide dependent count for version 6.13.3.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
Medium
popular Python PDF library, widely used in document processing pipelines
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment 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
Yes
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

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Pypdf

View all
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

CVE-2026-84310 MEDIUM POC
4.8 Sep 01

Resource exhaustion in pypdf prior to 6.16.1 allows an attacker who can supply a crafted PDF to cause denial of service

CVE-2026-103000 HIGH
8.7 Sep 30

Memory exhaustion in pypdf versions prior to 6.19.0 allows a remote, unauthenticated attacker to make an application una

CVE-2026-102999 HIGH
8.7 Sep 30

Denial of service in pypdf versions prior to 6.19.0 allows an unauthenticated remote attacker to pin a PDF-processing wo

CVE-2026-102998 HIGH
8.7 Sep 30

Denial of service in pypdf versions prior to 6.19.0 allows remote, unauthenticated attackers to exhaust application CPU

CVE-2026-102997 HIGH
8.7 Sep 30

Denial of service in pypdf before 6.18.1 lets a crafted PDF drive the library's FlateDecode recovery path into inefficie

CVE-2026-102996 HIGH
8.7 Sep 30

Memory exhaustion in pypdf versions prior to 6.18.1 lets a crafted PDF force the library to allocate and process far mor

CVE-2026-102995 HIGH
8.7 Sep 30

Memory exhaustion in pypdf versions prior to 6.18.1 allows unauthenticated remote attackers to crash or degrade any appl

Vendor StatusVendor

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