Skip to main content

pypdf CVE-2026-84311

| EUVDEUVD-2026-69607 MEDIUM
Excessive Iteration (CWE-834)
2026-09-01 GitHub_M GHSA-763m-79hh-57f2
4.8
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 exponential DAG Form XObject structure
  2. Delivery
    Submit crafted PDF to pypdf-powered endpoint
  3. Exploit
    Trigger _extract_text traversal
  4. Execution
    Exhaust worker CPU and memory
  5. Impact
    Deny service to legitimate users

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Excessive iteration
Exploitation Conditions

The target application must call pypdf's extract_text() method or any internal path invoking PageObject._extract_text or PageObject.extract_xform_text on a PDF supplied by an attacker, using pypdf prior to 6.16.1. No authentication, elevated privilege, or non-default configuration is required on the attacker's side - only the ability to submit a PDF file for processing. What limits exploitation is entirely on the defender's side: applications that process only internally-generated or pre-validated PDFs from trusted sources are not at risk. The Form XObject mechanism exploited is a standard, always-enabled PDF feature, not an optional mode, so there is no configuration flag to disable it as a workaround.

Impact

The provided CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VA:L, score 4.8) assigns local attack vector with user participation, which reflects a desktop tool usage pattern. For the more common deployment pattern - web services and data pipelines that automatically process user-uploaded PDFs - the effective attack vector is network with no meaningful user interaction required beyond a file upload, making the score a material understatement of real-world risk. No EPSS data was provided and the CVE carries no CISA KEV listing, meaning exploitation is not confirmed to be occurring. No public exploit code has been identified, though the attack primitive is straightforward for anyone with PDF format knowledge. The impact is limited to availability (CPU and memory exhaustion of the processing worker), with no confidentiality or integrity implications. Relative priority depends almost entirely on deployment context: operators running pypdf in automated, network-accessible ingestion pipelines against untrusted input should treat this as a meaningful availability risk; operators processing only trusted, internally-generated PDFs face essentially zero risk.

Exploit ScenarioDerived

An attacker constructs a PDF in which a root Form XObject invokes two named child XObjects, each of which in turn invokes the same grandchild XObject twice - a structure that is fully valid per the PDF specification. Submitting this PDF to a document ingestion API or file-processing service built on pypdf causes extract_text() to enter an exponential traversal, stalling the worker process with mounting CPU and memory consumption. No public proof-of-concept exists, but the crafted PDF is trivially constructable by anyone familiar with PDF XObject syntax.

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 – Sep 01, 2026

Exponential traversal denial-of-service in pypdf before 6.16.1 allows an attacker who can supply a crafted PDF to cause severe CPU stalls and memory exhaustion in any application invoking PageObject._extract_text or PageObject.extract_xform_text. The text extraction routines previously detected only direct cycles via a known_ids set, but failed to bound the total number of XForm invocations across a directed acyclic graph where each parent node reuses the same child XObject multiple times, producing O(2^n) traversal paths for n levels. No active exploitation or public exploit code has been identified; the fix is confirmed available in version 6.16.1.

RemediationAI

Upgrade pypdf to version 6.16.1 or later (https://github.com/py-pdf/pypdf/releases/tag/6.16.1), which enforces a hard limit of 5,000 total XForm invocations per text extraction and adds depth and entry-count limits for outline traversal, eliminating the exponential blowup. If an immediate upgrade is not possible, consider running PDF text extraction in a subprocess or thread with a strict wall-clock timeout and memory ceiling (e.g., via resource.setrlimit(RLIMIT_AS, ...) on Linux or a concurrent.futures timeout) so that a stalled extraction cannot block the main application; be aware this introduces complexity around result handling. Pre-filtering PDFs by rejecting documents with abnormally high XObject counts using a lightweight structural scan (e.g., via pypdf.PdfReader without extracting text) is a possible compensating control but is difficult to calibrate reliably without the fix in place.

Affected VersionsENISA

pypdf < 6.16.1

Affected Packages

pypi pypdf fix: 6.16.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 free, pure-Python PDF library (CPE: cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*) used to read, merge, and extract content from PDF files. PDF documents support Form XObjects - named, reusable graphical and content streams that can themselves reference other XObjects. The prior traversal logic in pypdf/_page.py maintained a known_ids set to prevent re-entering the exact same XObject on the current stack path (direct cycle detection), but this does not prevent a DAG structure where multiple distinct parent nodes each legitimately invoke the same child, causing the total number of traversal paths to grow exponentially with tree depth. CWE-834 (Excessive Iteration) covers this algorithmic complexity class, sometimes called a 'billion laughs' or ReDoS-analogue for tree walkers. The fix introduces a _TraversalState object carrying a global counter; once MAX_XFORM_INVOCATIONS_PER_EXTRACTION = 5,000 total XForm calls are reached for a single extraction, further XObjects are skipped with a warning. The same patch also adds OUTLINE_MAX_ENTRIES = 100,000 and OUTLINE_MAX_DEPTH = 100 guards to _doc_common.py to close a parallel outline-traversal vector.

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

Network-reachable in typical web service deployments that auto-process uploaded PDFs; no auth or user interaction needed beyond submitting a file.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

1
Patch available
Sep 01, 2026 - 22:03 EUVD

DescriptionCVE.org

pypdf is a free and open-source pure-python PDF library. Prior to 6.16.1, an attacker can craft a PDF that causes pypdf/_page.py PageObject._extract_text and PageObject.extract_xform_text to traverse a directed acyclic graph of reused form XObjects in which each form invokes a child multiple times, creating exponentially many traversal paths and causing long runtimes and large memory consumption. This issue is fixed in version 6.16.1.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
widely-used Python PDF library in data pipelines and web services
Threat Intel
1
1 sources
Data Quality
8 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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 No
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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

24
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +24
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

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

Vendor StatusVendor

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