Skip to main content

pypdf EUVDEUVD-2026-90367

| CVE-2026-102995 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-09-30 GitHub_M GHSA-fp3h-c4fm-7vvf
8.7
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 oversized /ToUnicode CMap tokens
  2. Delivery
    Submit PDF to pypdf-based service
  3. Exploit
    parse_bfchar decodes/retains oversized values
  4. Execution
    Memory exhaustion crashes worker
  5. Impact
    Denial of service

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

Requires an application built on pypdf (versions prior to 6.18.1) to process an attacker-supplied PDF and invoke a code path that parses the font /ToUnicode CMap - most notably text extraction, which routes through _cmap.py parse_bfchar. The crafted PDF must contain unusually large source-code or destination-string tokens in the /ToUnicode mapping. No authentication or user interaction with the parser is required beyond getting the PDF ingested. Limiting factors: impact is confined to memory exhaustion (availability only, no code execution or data disclosure); deployments that never process untrusted PDFs, or that have already applied the two prior /ToUnicode resource-consumption fixes plus 6.18.1, are not exposed to this remaining token-length path.

Impact

This is a resource-consumption / denial-of-service issue (CWE-400) with no confidentiality or integrity impact - the vendor CVSS 4.0 vector (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H) scores 8.7 driven solely by VA:H availability impact. The network vector and no-auth/no-interaction metrics reflect that the 'attacker' input is simply a crafted PDF file, so realistic exploitability depends entirely on whether an application feeds untrusted PDFs into pypdf and calls parsing/text-extraction paths. Exploitation status: no public exploit identified at time of analysis (no KEV listing and no EPSS score were provided in the input); the PR does include regression tests that reproduce the oversized-token behavior, which functions as a working proof-of-condition but not a weaponized exploit. The 8.7 rating overstates real-world urgency somewhat: this is a memory-exhaustion DoS in a library, not remote code execution, and it is the third incremental fix ('second follow-up') closing a remaining token-length path after earlier /ToUnicode hardening - indicating a narrow residual bug rather than a broad new attack surface. Treat as a real but non-critical priority: patch promptly in any service that processes untrusted PDFs, lower urgency for offline/trusted-input use.

Exploit ScenarioDerived

An attacker submits a malicious PDF to a service that uses pypdf (e.g. a document-upload, indexing, or text-extraction pipeline). The PDF embeds a font /ToUnicode CMap containing unusually large source-code or destination-string tokens; when pypdf's _cmap.py parse_bfchar decodes and retains these oversized values during text extraction, memory consumption balloons, degrading or crashing the worker process. No public weaponized exploit exists, but the fix PR ships regression tests demonstrating the oversized-token condition.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Sep 30, 2026

Memory exhaustion in pypdf versions prior to 6.18.1 allows unauthenticated remote attackers to crash or degrade any application that parses attacker-supplied PDFs, by embedding oversized source-code or destination-string tokens inside a font /ToUnicode CMap. Processing such a file (for example during text extraction, which routes through pypdf/_cmap.py parse_bfchar) makes the library decode and retain these oversized values, driving availability-impacting memory consumption with no confidentiality or integrity effect. The vendor CVSS 4.0 vector (8.7, VA:H only, PR:N/UI:N) matches the assessed CVSS 3.1 vector of AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H; no public exploit code or KEV-listed active exploitation was identified at time of analysis, and a vendor-released patch (6.18.1) is available.

RemediationAI

Vendor-released patch: upgrade pypdf to 6.18.1 or later, which enforces MAX_CMAP_CODE_BYTES_LIMIT (16 bytes) and MAX_CMAP_STRING_BYTES_LIMIT (1024 bytes) in parse_bfchar/parse_bfrange and raises LimitReachedError instead of retaining oversized tokens; see the advisory at https://github.com/py-pdf/pypdf/security/advisories/GHSA-fp3h-c4fm-7vvf, the fix in https://github.com/py-pdf/pypdf/pull/4071 (commit https://github.com/py-pdf/pypdf/commit/319d0b823ce2c311a2435e9fd93c13994d32bb51), and the release at https://github.com/py-pdf/pypdf/releases/tag/6.18.1. Because this is only the last remaining token-length path of a series of /ToUnicode fixes, confirm that earlier fixes are also present rather than backporting this commit in isolation. If immediate upgrade is not possible, the actionable compensating controls are: avoid invoking text-extraction or any /ToUnicode-dependent parsing on untrusted PDFs (trade-off: loss of text-search/indexing functionality for those documents); run the parsing workload in a sandboxed worker with a hard memory cap and OOM-kill (for example a container memory limit or ulimit -v), so exhaustion terminates only the worker rather than the host (trade-off: attackers can still force repeated worker restarts and consume a share of capacity); and impose request timeouts plus per-document size and queue limits at the ingestion boundary to bound how many crafted files can be processed concurrently (trade-off: legitimate large PDFs may be rejected or slowed). Blocking or sanitizing font /ToUnicode entries before handing PDFs to pypdf is possible but brittle, since legitimate documents rely on that mapping for correct text rendering.

Affected VersionsENISA

pypdf < 6.18.1

Affected Packages

pypi pypdf fix: 6.18.1

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 library (CPE cpe:2.3:a:py-pdf:pypdf, CWE-400 uncontrolled resource consumption). The flaw lives in the /ToUnicode CMap parser: PDF fonts may include a /ToUnicode character map that maps character codes to Unicode strings, and pypdf parses it in pypdf/_cmap.py. The parser walks bfchar and bfrange sections, splitting each line into source-code and destination-string tokens, hex-decoding them (unhexlify) and adding entries to an in-memory mapping dictionary. Prior fixes already capped the number of iterations and some resource paths; this third issue is the remaining token-length path, where an attacker crafts a mapping line whose source token or destination string is far larger than any legitimate CMap entry. The upstream patch (PR #4071, commit 319d0b823ce2c311a2435e9fd93c13994d32bb51) introduces a _check_token_length helper with MAX_CMAP_CODE_BYTES_LIMIT (16 bytes) and MAX_CMAP_STRING_BYTES_LIMIT (1024 bytes) and raises LimitReachedError on violation, while also hardening adjacent parsing: empty lines are skipped with a warning, odd-length token lists are truncated with a warning, the destination token is length-checked before unhexlify/decode, and the previous broad 'except (ValueError, IndexError)' was narrowed to ValueError. The test suite added in the same PR demonstrates the exact failure boundaries (e.g. 'Maximum /ToUnicode code length exceeded: 18 > 16' and 'Maximum /ToUnicode string length exceeded: 1026 > 1024'). The root cause class is unbounded input-driven memory retention, not memory corruption, so exploitation yields denial of service rather than code execution or data exposure.

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 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Untrusted PDF is remotely supplied (AV:N) and trivially crafted (AC:L, no auth/interaction); impact is memory-exhaustion DoS only, so C:N/I:N/A:H, scope unchanged.

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
Red Hat 6.5 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
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Sep 30, 2026 - 21:04 EUVD
CVE Published
Sep 30, 2026 - 20:01 cve.org
HIGH 8.7

DescriptionCVE.org

pypdf is a free and open-source pure-python PDF library. Prior to 6.18.1, a crafted PDF can place unusually large source-code or destination-string tokens in a font /ToUnicode mapping, causing pypdf/_cmap.py parse_bfchar to decode and retain oversized values during operations such as text extraction and consume excessive memory. This is a second follow-up to earlier /ToUnicode resource-consumption fixes and is limited to the remaining token-length path. This issue is fixed in version 6.18.1.

Blast Radius

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

Ecosystem-wide dependent count for version 6.18.1.

Technical POC Analysis

Evidence note: the supplied material is the GitHub advisory plus the CVE metadata.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

pypdf versions prior to 6.18.1 are vulnerable to a memory exhaustion flaw that can crash or degrade any application parsing attacker-supplied PDFs, leading to denial of service. This affects organizations that process PDFs from untrusted sources, potentially disrupting critical business services and customer-facing operations. Leadership should prioritize patching to maintain service availability and prevent operational disruptions.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% exploitable
Prevalence
High
pypdf is a widely-used pure-Python PDF library across many Python applications
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD 🇯🇵JVN 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 HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
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-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-102994 HIGH
8.7 Sep 30

Denial of service in pypdf versions prior to 6.18.0 allows remote, unauthenticated attackers to stall PDF parsing by sup

CVE-2026-102993 HIGH
8.7 Sep 30

Memory-exhaustion denial of service in pypdf versions prior to 6.17.0 allows remote attackers to inflate application mem

Vendor StatusVendor

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