Skip to main content

pypdf CVE-2026-102998

| EUVDEUVD-2026-90384 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-09-30 GitHub_M GHSA-php9-fj8v-98fj
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 choice field options/values
  2. Delivery
    Submit to PDF-processing service
  3. Exploit
    App flattens form fields via pypdf
  4. Execution
    Invariant glyph work repeats per loop iteration
  5. Persist
    CPU exhaustion and worker hang
  6. Impact
    Application unavailability

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 the consuming application to process an attacker-supplied PDF through pypdf's form-field update path with flattening enabled (update_page_form_field_values with flatten=True), and the malicious PDF must contain a choice/form field with a large number of options and selected values so the invariant selection-glyph computation repeats per line. Limiting factors: the vulnerable code path is not reached by merely opening or reading a PDF - the application must explicitly perform field updates with flattening; impact is availability only (no data exposure or code execution); pypdf < 6.19.0 must be in use.

Impact

Signals are consistent in pointing to a moderate, availability-only risk. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VA:H, base 8.7 'High') describes an unauthenticated, network-reachable algorithmic-complexity DoS with no confidentiality or integrity impact (VC:N/VI:N). No EPSS score, no CISA KEV listing, and no public exploit were provided, so this is 'no public exploit identified at time of analysis' - although the fixing PR (#4087) ships a reproducer test (test_generate_appearance_stream_data__selection__speed with a 10s timeout), so a working trigger is effectively public in the test suite even if not packaged as a standalone exploit. The vendor 8.7 is aggressive for a pure availability bug: the PR:N/UI:N metrics understate a real precondition - the flaw only fires when the CONSUMING application invokes pypdf's form-field update path with flattening enabled on the attacker's PDF, which is application/config-dependent rather than a default-exposed network service. This is best treated as a library-hardening/DoS priority (patch during normal cycles) rather than an emergency: real exploitation requires a document-processing pipeline that both accepts untrusted PDFs and flattens their form fields. No signals conflict beyond the vendor severity being on the high side for a VA-only issue.

Exploit ScenarioDerived

An attacker submits a crafted PDF containing a choice form field with a very large number of options and selected values (the reproducer uses ~1000 each) to a service that uses pypdf to fill and flatten form fields. When the application calls update_page_form_field_values(..., flatten=True), pypdf's appearance-stream generator recomputes the invariant selection-to-glyph mapping on every line of the loop, causing near-quadratic runtime that hangs the worker and denies service. No standalone public exploit is published, but the fixing PR includes a timing reproducer that demonstrates the trigger.

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

Denial of service in pypdf versions prior to 6.19.0 allows remote, unauthenticated attackers to exhaust application CPU by supplying a crafted PDF whose AcroForm choice field carries a large number of options and selected values; when a consuming application calls update_page_form_field_values with flatten=True, the appearance-stream generator recomputes the same invariant selection-glyph set once per line, driving runtimes up until the host process or worker becomes unavailable. The flaw is rated CVSS 4.0 8.7 (and 3.1 8.1 by independent assessment) with availability-only impact - no confidentiality or integrity loss, and no code execution. Exploitation requires the application to explicitly perform form-field updates with flattening on attacker-controlled input; merely opening, parsing, or reading the PDF does not reach the vulnerable code path. No public exploit code has been identified at time of analysis, and there is no confirmed active exploitation (CISA KEV); the fix ships in upstream release 6.19.0.

RemediationAI

Upgrade to pypdf 6.19.0 or later - the vendor-released patch that fixes this issue (release: https://github.com/py-pdf/pypdf/releases/tag/6.19.0; advisory: https://github.com/py-pdf/pypdf/security/advisories/GHSA-php9-fj8v-98fj; fix PR: https://github.com/py-pdf/pypdf/pull/4087, commit 959467a9b95be83e2dc5ae873ece5f371263ede7). If an immediate upgrade is not possible, the single highest-value compensating control is to stop calling update_page_form_field_values with flatten=True on untrusted, externally submitted PDFs - flattening is only needed when the output must be non-editable, so defer it to a trusted post-processing step or a separate low-privilege worker, at the cost of a two-stage pipeline and extra storage. Second, wrap any pypdf form-fill operation that must handle untrusted input in a hard wall-clock/CPU budget (e.g., SIGALRM or a process-level timeout) inside an isolated, resource-capped worker so a pathological PDF is killed rather than pinning a service thread; the trade-off is that legitimate very large forms may be aborted and need a manual/queued retry path. Third, pre-validate incoming PDFs before processing - reject or quarantine files whose AcroForm choice fields declare an unusually large number of /Opt entries or whose /V array length is disproportionate - accepting some false positives on genuinely large forms. Finally, cap concurrency and per-request queue depth for the PDF-processing service so that even a successful burst cannot consume all available workers; none of these workarounds remove the underlying defect, so patching to 6.19.0 remains the only complete fix.

Affected VersionsENISA

pypdf < 6.19.0

Affected Packages

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

CVE-2026-102998 is an uncontrolled resource consumption issue (CWE-400) in pypdf's appearance-stream generation, specifically in pypdf/generic/_appearance_stream.py. When a PDF's AcroForm contains a choice field (/FT /Ch) with a large /Opt option array and a large /V value array, and the embedding application updates field values with flattening enabled, pypdf regenerates the widget appearance stream to bake the field content into the page. The vulnerable loop builds the stream line by line, and for each line it recomputed the entire selection-glyph mapping via _unicode_to_glyph_id("".join(selection), reverse_cmap) - an invariant per-iteration computation. With N selected values, this makes the loop roughly quadratic and drives CPU time far beyond a tolerable request budget. The upstream fix (PR py-pdf/pypdf#4087, commit 959467a9b95be83e2dc5ae873ece5f371263ede7, released in 6.19.0) hoists that computation out of the loop - computing selection_glyphs once, memoizing it for subsequent line comparisons - and additionally switches the stream accumulator from repeated immutable bytes concatenation to a bytearray with a final bytes() conversion, which removes a second source of quadratic work. The affected product is identified by CPE cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:* (all versions before 6.19.0). Because pypdf is a pure-Python library embedded in web services, document pipelines, and batch converters, the practical impact is bounded by how the host application invokes the flattening API - not by the library in isolation.

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

Attacker-supplied PDF reaches the flatten path with no auth or interaction (AV:N/PR:N/UI:N), causing CPU-exhaustion DoS only, so A:H with C:N/I:N.

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 7.5 HIGH

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:09 cve.org
HIGH 8.7

DescriptionCVE.org

pypdf is a free and open-source pure-python PDF library. Prior to 6.19.0, a crafted PDF with form field values can cause pypdf/generic/_appearance_stream.py appearance-stream generation to repeat invariant selection-data work inside a loop when an application updates fields with flattening enabled, resulting in excessive runtimes and application unavailability. This issue is fixed in version 6.19.0.

Blast Radius

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

Ecosystem-wide dependent count for version 6.19.0.

Technical POC Analysis

Evidence basis: GitHub Security Advisory GHSA-php9-fj8v-98fj (py-pdf/pypdf, published 2026-09-16) plus the supplied summary.

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.19.0 expose document-processing services to a high-severity denial-of-service condition that can exhaust CPU and make the affected worker or host unavailable when applications flatten attacker-controlled PDF form fields. Organizations using pypdf in customer-facing or batch document pipelines should care because this can disrupt service availability without risking data confidentiality or integrity. No public exploit identified at time of analysis and no vendor-released patch identified at time of analysis; code-level mitigations and monitoring are required until a fix is available.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis; interim mitigations include disabling update_page_form_field_values with flatten=True for untrusted PDFs, rejecting or quarantining PDFs with excessive AcroForm choice-field options/selected values, enforcing strict CPU/timeout limits and worker isolation, rate limiting, and monitoring for CPU exhaustion.

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

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