Skip to main content

pypdf CVE-2026-119209

| EUVDEUVD-2026-113381 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-10-29 GitHub_M GHSA-x3rh-gjgm-fmqc
7.1
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Deliver crafted PDF to pypdf-based service
  2. Delivery
    Victim opens/parses file with pypdf
  3. Exploit
    Xref stream declares huge/negative entry counts
  4. Execution
    Parser allocates excessive memory
  5. Impact
    Memory exhaustion 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

Triggering requires the application to open and parse an attacker-supplied PDF with pypdf prior to 6.21.3, and the malicious document must use PDF 1.5+ cross-reference streams (the vulnerable code path _read_pdf15_xref_stream); plain classic xref-table PDFs are not affected. The crafted file abuses very large declared entry counts, highly compressible FlateDecode streams, /Prev chains that multiply entries across the document, and negative /Index counts that bypassed the former per-stream clamp. Limiting factors: exploitation needs passive user interaction (a file must be opened/processed, UI:P), affects only availability (memory/DoS) with no data confidentiality or integrity impact, and the fixed release adds a configurable xref_stream_maximum_entries cap (default 2,000,000) plus rejection of negative counts, so patched or limit-configured deployments are protected.

Impact

This is a memory-exhaustion denial-of-service issue (CWE-400/CWE-770) in the pypdf library, not a code-execution flaw. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H) is internally consistent with the description: the attack is network-deliverable and low-complexity, requires no privileges, but does require passive user interaction (UI:P) - an application or user must actually open the crafted PDF - and the only impact is availability (VA:H), with no confidentiality or integrity effect. No EPSS score, CISA KEV listing, or SSVC automatable/technical-impact fields were supplied, so exploitation-probability signals are absent rather than low; this cannot be treated as evidence of either high or low real-world exploitation. The vuln.today priority is 'this_week' and a vendor patch exists. Net assessment: a genuine but bounded availability risk - real priority for services that parse untrusted PDFs with pypdf, but it does not threaten data or system integrity and depends on the affected code path (cross-reference streams) being reached. Confirmed by the GHSA advisory and merged fix; exploitation telemetry (EPSS/KEV) is simply not present in the input, which should be stated rather than inferred.

Exploit ScenarioDerived

An attacker submits a specially crafted PDF to a service or user that parses it with a vulnerable pypdf version - for example an upload-processing backend, mail/attachment pipeline, or document viewer. The PDF uses cross-reference streams with inflated entry counts, highly compressible stream data, /Prev chains, and negative /Index counts to multiply parsed entries far beyond the file's size, driving pypdf to allocate excessive memory and exhausting the host, degrading or crashing the service. The merged pull request #4269 includes test code that constructs such triggering PDFs, so the crafting technique is publicly documented.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 PoC candidate (unverified) Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Oct 29, 2026

Memory exhaustion while parsing crafted PDFs in pypdf versions prior to 6.21.3 allows an attacker to drive a consuming process toward out-of-memory and crash it, giving a denial of service (availability-only impact, rated 7.1 under CVSS 4.0). Only applications that open untrusted PDFs through pypdf are exposed, and the malicious document must use PDF 1.5+ cross-reference streams rather than classic xref tables; a user or service must actually open/process the file, which is why the vector carries a user-interaction requirement. No confirmed active exploitation (no CISA KEV listing) and no public exploit identified at time of analysis; the vendor-released fix is version 6.21.3, which adds a configurable entry cap and rejects negative /Index counts.

RemediationAI

Upgrade to pypdf 6.21.3, the vendor-released patch version, available from https://github.com/py-pdf/pypdf/releases/tag/6.21.3 and pinned in requirements as pypdf>=6.21.3; the advisory at https://github.com/py-pdf/pypdf/security/advisories/GHSA-x3rh-gjgm-fmqc records the fix. If upgrading immediately is not possible, the vendor states you can apply the changes from PR https://github.com/py-pdf/pypdf/pull/4269 (commit a93fe3a901fd00af38f0a105c3ba7175fa72dcb4), which adds the xref_stream_maximum_entries reader parameter (default 2,000,000), enforces a document-wide xref-stream entry cap across /Prev chains, and neutralizes negative /Index counts; the trade-off is that the cap must be set high enough for legitimate large documents, otherwise valid PDFs will raise LimitReachedError. On patched code the cap remains tunable per deployment for resource-constrained environments.

Affected VersionsENISA

pypdf < 6.21.3

Affected Packages

pypi pypdf fix: 6.21.3

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

The flaw lives in pypdf's PDF 1.5 cross-reference stream parser (_read_pdf15_xref_stream) and is a resource-consumption class issue (CWE-400 uncontrolled resource consumption, tracked upstream as CWE-770). Cross-reference streams describe objects with /W-width encoded fields and an /Index array of (start, count) pairs; the library trusts the declared counts and allocates/parses entries accordingly. Three factors compound: the streams are FlateDecode-compressed and highly compressible, so a small file expands into a very large entry set; /Prev chains let a document link multiple xref streams so entry counts accumulate across the whole file rather than per stream; and negative /Index counts previously bypassed the existing per-stream clamp, allowing arbitrarily large declared counts. The current per-stream clamp was therefore ineffective against multi-stream accumulation. The fix (merged via PR #4269) introduces a reader option xref_stream_maximum_entries with a default of 2,000,000, accumulates a document-wide entry counter across trailers, raises LimitReachedError when the cap is exceeded, and normalizes negative /Index counts to zero (raising PdfStreamError in strict mode, warning otherwise). Classic xref-table PDFs do not traverse this code path and are unaffected. The assessed CVSS vector is AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H: remote-reachable but requiring the victim to open a crafted file, with no confidentiality or integrity impact.

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

Crafted PDF is remotely deliverable (AV:N, AC:L, PR:N) but must be opened (UI:R); impact is memory exhaustion only, so A:H with C:N/I:N and unchanged scope.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 5.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
Passive
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
Oct 29, 2026 - 21:03 EUVD
CVE Published
Oct 29, 2026 - 20:43 cve.org
HIGH 7.1

DescriptionCVE.org

pypdf is a free and open-source pure-python PDF library. Prior to 6.21.3, pypdf can consume excessive memory while opening a crafted PDF containing cross-reference streams that declare very large entry counts. Highly compressible streams and /Prev chains can multiply the number of parsed entries across a document, while negative /Index counts can bypass the existing per-stream clamp. This issue is fixed in version 6.21.3.

Blast Radius

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

Ecosystem-wide dependent count for version 6.21.3.

Technical POC Analysis

CWE-400 (Uncontrolled Resource Consumption), with the advisory also tagging CWE-770 (Allocation of Resources Without Limits or Throttling).

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

Latest POC

1 PoC candidate from github (unverified)

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

A high-severity vulnerability in the pypdf library (versions before 6.21.3) can cause memory exhaustion and crash any application that processes untrusted PDFs, directly threatening service availability. The impact is operational-disruption to document-handling workflows-and affects only systems that use pypdf to open PDFs from untrusted sources.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Medium
popular pure-Python PDF library embedded in many document-processing pipelines
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL 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 Yes
EPSS 0.3%
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
Medium
Technical Impact
Partial

Priority Score

56
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
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.

More in Pypdf

View all
CVE-2026-119208 HIGH POC
7.1 Oct 29

Denial of service in pypdf before 6.21.3: retrieving the page count (for example via len(reader.pages) or get_num_pages(

CVE-2026-119207 HIGH POC
7.1 Oct 29

Memory exhaustion in the pypdf PDF library before 6.21.3 allows a small, deliberately malformed PDF dictionary to blow u

CVE-2026-119206 HIGH POC
7.1 Oct 29

pypdf before 6.21.3 can be driven into excessive CPU consumption when an application retrieves page labels from a specia

CVE-2026-119205 HIGH POC
7.1 Oct 29

Cloning or duplicating a crafted cyclic DictionaryObject with pypdf before 6.21.4 can hang the calling process in an inf

CVE-2026-119204 HIGH POC
7.1 Oct 29

Parsing a crafted PDF with pypdf before 6.21.4 can drive disproportionate memory consumption when the library enumerates

CVE-2026-119203 HIGH POC
7.1 Oct 29

Denial of service in pypdf prior to 6.21.4 lets remote attackers hang a PDF-processing thread by supplying an incomplete

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-2026-54651 MEDIUM POC
6.9 Jun 22

Infinite loop denial-of-service in pypdf prior to 6.13.1 allows an attacker to hang any process that merges a crafted PD

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

Vendor StatusVendor

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