Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft PDF with /Length-less content stream
-
DeliveryDeliver PDF to pypdf-consuming application
-
ExploitApplication invokes pypdf content stream parser
-
ExecutionMAX_DECLARED_STREAM_LENGTH bypass triggers unbounded memory allocation
-
ImpactMemory 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
1DescriptionCVE.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- 7 pypi packages depend on pypdf (7 direct, 0 indirect)
Ecosystem-wide dependent count for version 6.13.3.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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
Infinite loop denial-of-service in pypdf prior to 6.13.1 allows an attacker to hang any process that merges a crafted PD
pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat
pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat
pypdf is an open source, pure-python PDF library. Rated medium severity (CVSS 5.5), this vulnerability is no authenticat
Resource exhaustion in pypdf prior to 6.16.1 allows an attacker who can supply a crafted PDF to cause denial of service
Memory exhaustion in pypdf versions prior to 6.19.0 allows a remote, unauthenticated attacker to make an application una
Denial of service in pypdf versions prior to 6.19.0 allows an unauthenticated remote attacker to pin a PDF-processing wo
Denial of service in pypdf versions prior to 6.19.0 allows remote, unauthenticated attackers to exhaust application CPU
Denial of service in pypdf before 6.18.1 lets a crafted PDF drive the library's FlateDecode recovery path into inefficie
Memory exhaustion in pypdf versions prior to 6.18.1 lets a crafted PDF force the library to allocate and process far mor
Memory exhaustion in pypdf versions prior to 6.18.1 allows unauthenticated remote attackers to crash or degrade any appl
EUVD-2026-40425
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB