Skip to main content

pypdf EUVDEUVD-2026-54615

| CVE-2026-71870 MEDIUM
Uncontrolled Resource Consumption (CWE-400)
2026-08-07 https://github.com/py-pdf/pypdf GHSA-fp3f-mc75-235c
4.8
CVSS 4.0 · Vendor: https://github.com/py-pdf/pypdf
View

Attack ChainAIDerived

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

  1. Access
    Craft PDF with oversized /ToUnicode bfrange tokens
  2. Delivery
    Submit PDF to pypdf-powered service
  3. Exploit
    Service invokes text extraction
  4. Execution
    parse_bfrange iterates unbounded token without length check
  5. Persist
    Memory exhausted
  6. Impact
    Process 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.

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

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

Alert me

AnalysisAIv1 – 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

pypdf < 6.15.0

Affected Packages

pypi pypdf fix: 6.15.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 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

Vendor (https://github.com/py-pdf/pypdf) PRIMARY 4.8 MEDIUM
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
vuln.today AI 7.5 HIGH

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.

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

Primary rating from Vendor (https://github.com/py-pdf/pypdf).

CVSS VectorVendor: https://github.com/py-pdf/pypdf

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

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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 12 pypi packages depend on pypdf (9 direct, 3 indirect)

Ecosystem-wide dependent count for version 6.15.0.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
popular Python PDF library, broad pip ecosystem adoption
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High

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 Yes
EPSS 0.1%
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· derived
Poc
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +24
PoC: +20
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.

Vendor StatusVendor

SUSE

Severity: Moderate

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