Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft PDF with oversized /ToUnicode bfrange tokens
-
DeliverySubmit PDF to pypdf-powered service
-
ExploitService invokes text extraction
-
Executionparse_bfrange iterates unbounded token without length check
-
PersistMemory exhausted
-
ImpactProcess crash or OOM kill (DoS)
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 application invokes pypdf's text extraction path (e.g., extract_text() or any code path that triggers CMap parsing) against an attacker-supplied PDF. The vulnerable code is reached specifically when a PDF font includes a /ToUnicode entry containing a bfrange operator with token values whose hex-encoded length exceeds the now-enforced limits (16 hex chars for codes, 1024 hex chars for strings). No authentication, special privileges, or non-default configuration is needed on the attacker's side; the only prerequisite is the ability to deliver a PDF to the processing endpoint. Exploitation is limited to denial of service - there is no code execution path. Applications that only read PDF metadata (not text) and never invoke CMap parsing are not affected. |
| Impact | No official CVSS score has been assigned at time of analysis; the assessment below is independently derived. The vulnerability is a pure availability impact with no confidentiality or integrity consequence. Real-world risk is highest for applications that automatically process untrusted PDFs - document ingestion pipelines, PDF-to-text APIs, and similar services - where a single malformed upload could exhaust process or container memory. For interactive desktop tools, risk is lower because a user must open the file. KEV status is negative and no public exploit code is confirmed, so this is not an emergency for well-monitored environments. However, the attack is trivial to reproduce given the PR diff (a bfrange entry with an oversized token is all that is needed), and any system accepting arbitrary PDFs should treat this as a practical risk. EPSS data is not available given the CVE is newly reported. The primary signal for prioritization is automated PDF processing exposure, not the vulnerability severity in isolation. |
| Exploit ScenarioDerived | An attacker submits a crafted PDF to a document-processing web service that uses pypdf for text extraction. The PDF contains a font object whose /ToUnicode CMap stream includes a bfrange entry with a code or destination string spanning thousands of hex characters - far beyond what any legitimate font requires. When the service processes the file, parse_bfrange iterates the oversized token without a length check, allocating a large in-memory dictionary entry, and the process memory grows until it is killed by the OS or exhausts available RAM, causing a denial of service. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 07, 2026
Uncontrolled memory consumption in pypdf's /ToUnicode CMap parser allows a remote attacker to cause denial of service by supplying a crafted PDF containing font entries with abnormally large bfrange code or string tokens. All pypdf versions prior to 6.15.0 are affected when performing text extraction operations. No public exploit or active exploitation is identified, but the fix is straightforward and the attack requires only the ability to supply a PDF to an application using the library.
RemediationAI
Upgrade pypdf to version 6.15.0 or later using 'pip install --upgrade pypdf>=6.15.0'; this is the vendor-released patch confirmed at https://github.com/py-pdf/pypdf/releases/tag/6.15.0. If an immediate upgrade is not possible, apply the upstream fix manually from PR #3944 (https://github.com/py-pdf/pypdf/pull/3944) or the corresponding commit at https://github.com/py-pdf/pypdf/commit/afba8080e19d29a3c256a742b340995e695b35aa, which adds token-length guards to pypdf/_cmap.py. As a compensating control for services that cannot be patched immediately, restrict which PDF files reach the pypdf parser: validate file size, quarantine uploads to sandboxed worker processes with memory limits (e.g., ulimit -v or Docker memory constraints), and terminate workers that exceed a defined threshold. Note that memory-limiting worker processes will cause processing failures for legitimate large PDFs, so it should be paired with a retry queue rather than used as a permanent measure.
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 manipulation library (pkg:pip/pypdf). The affected code resides in pypdf/_cmap.py, specifically the parse_bfrange function responsible for decoding /ToUnicode CMap streams embedded in PDF font objects. CMap streams map glyph codes to Unicode code points; the bfrange operator defines contiguous ranges. Prior to 6.15.0, the parser applied no upper bounds on the byte length of individual code or string tokens when iterating over these ranges. Because range entries are stored in a dictionary in memory, a maliciously crafted CMap with oversized token values - e.g., a code spanning thousands of hex characters - could force unbounded memory allocation. CWE-400 (Uncontrolled Resource Consumption) captures the root cause: the library trusted attacker-controlled data sizes without enforcing a limit. The fix introduces MAX_CMAP_CODE_BYTES=8 (16 hex-char limit) and MAX_CMAP_STRING_BYTES=512 (1024 hex-char limit), enforced via a _check_token_length function that raises LimitReachedError on violation.
Know when the next one hits your stack
- 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:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Network vector applies to the common automated-PDF-processing deployment; no privileges or user interaction needed beyond supplying the crafted PDF; impact is availability-only.
Primary rating from Vendor (https://github.com/py-pdf/pypdf).
CVSS VectorVendor: https://github.com/py-pdf/pypdf
DescriptionCVE.org
Impact
An attacker who uses this vulnerability can craft a PDF which leads to large memory consumption. This requires parsing the /ToUnicode entry of a font with unusually large values, for example during text extraction.
Patches
This has been fixed in pypdf==6.15.0.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #3944.
Blast Radius
ecosystem impact- 12 pypi packages depend on pypdf (9 direct, 3 indirect)
Ecosystem-wide dependent count for version 6.15.0.
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.
EUVD-2026-54615
GHSA-fp3f-mc75-235c
NVD
CVE.org
EPSS
VulDB
Exploit-DB