Skip to main content

pypdf CVE-2026-84309

| EUVDEUVD-2026-69477 MEDIUM
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-09-01 GitHub_M GHSA-jp53-mhqp-8xcg
6.9
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Recon
    Craft PDF with cyclic /Next tree node links
  2. Delivery
    Upload or deliver to pypdf-based document processing service
  3. Exploit
    Service invokes insert_child on write path
  4. Install
    Traversal loop never exits (no cycle detection)
  5. C2
    Worker process hangs indefinitely
  6. Execute
    Repeated submissions exhaust worker pool
  7. Impact
    Service denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
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

The target application must use pypdf prior to 6.16.0 AND must invoke the write path on a user-supplied PDF - specifically, a code path that calls TreeObject.insert_child, such as merging PDFs, adding annotations, or inserting bookmarks. Applications that only perform read-only operations (text extraction, thumbnail generation, metadata inspection) are not affected. No authentication is required at the library level; any endpoint that accepts an untrusted PDF file and then writes or modifies it using pypdf is at risk. Exploitation is further limited to environments without process-level timeouts or resource controls, since a timeout would terminate the hung worker rather than allow sustained DoS.

Impact

The official CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:N/VA:H, score 6.9) models the vulnerability from the library's perspective - a malicious file on the local filesystem. In realistic server-side deployments, pypdf often processes PDFs received over the network (document management systems, PDF conversion APIs, report generators), making the effective attack surface materially wider than AV:L implies. Impact is purely availability: there is no confidentiality or integrity effect. The vulnerability is exclusively on the write path - applications that only parse/extract text from PDFs without invoking insert_child are not affected. No EPSS data was provided and no KEV entry exists, suggesting no observed in-the-wild exploitation at time of analysis. The functional PoC in the fix PR meaningfully lowers the exploitation bar for anyone targeting a vulnerable service.

Exploit ScenarioDerived

An attacker submits a crafted PDF - where /Next links form a cycle among three or more TreeObject nodes - to a web service that uses pypdf to transform or annotate documents (e.g., add a watermark, merge pages). When the service calls insert_child on the malicious tree structure during the write operation, the traversal loop never terminates, the worker process hangs indefinitely, and repeated submissions can exhaust the worker pool, rendering the service unavailable. A proof-of-concept replicating this exact three-node cycle is included in fix PR #3964.

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

Infinite loop denial of service in pypdf prior to 6.16.0 allows any attacker who can supply a crafted PDF to a pypdf-based write pipeline to permanently hang the processing worker. The root cause is in TreeObject.insert_child within pypdf/generic/_data_structures.py, which traverses /Next links without cycle detection; a PDF whose tree nodes form a circular reference (A→B→C→A) causes unbounded traversal. No public exploitation has been confirmed and no CISA KEV entry exists, but a functional proof-of-concept is embedded in the upstream fix PR (#3964).

RemediationAI

Upgrade pypdf to version 6.16.0 or later; this is the primary and complete fix, confirmed by the vendor release at https://github.com/py-pdf/pypdf/releases/tag/6.16.0. If immediate upgrade is not feasible, apply process-level timeouts (e.g., Python's signal.alarm or a subprocess wrapper with a timeout) to kill hung workers before they exhaust resources - this limits blast radius but does not prevent the hang itself. Applications can also reject or quarantine PDFs from untrusted sources before passing them to any write path. Note that the vulnerability is only triggered when insert_child is invoked during a write operation; read-only usage (text extraction, page count, metadata reading) is unaffected and carries no exposure.

Affected VersionsENISA

pypdf < 6.16.0

Affected Packages

pypi pypdf fix: 6.16.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 (CPE: cpe:2.3:a:py-pdf:pypdf) is a pure-Python library for reading and writing PDF files. The PDF specification uses tree structures - name trees and number trees - whose leaf nodes are doubly linked via /Next and /Prev dictionary keys. The TreeObject.insert_child method traverses this /Next chain to locate the insertion point before appending a new child. Prior to 6.16.0, no visited-node tracking existed, so a cyclic reference embedded by an attacker (node A /Next → B /Next → C /Next → A) produces a loop with no reachable exit condition, satisfying CWE-835 (Loop with Unreachable Exit Condition). The fix (commit c9ba557) introduces a Python set of visited object IDs and raises LimitReachedError upon revisiting any node.

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 6.9 MEDIUM
CVSS:4.0/AV:L/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

Server-side PDF processing services receive files over the network; no credentials needed; pure availability impact with no confidentiality or integrity effect.

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 (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
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

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

DescriptionCVE.org

pypdf is a free and open-source pure-python PDF library. Prior to 6.16.0, an attacker can craft a PDF whose cyclic tree structure causes pypdf/generic/_data_structures.py TreeObject.insert_child to follow /Next links indefinitely when a writing code path inserts a child, producing an infinite loop. This issue is fixed in version 6.16.0.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
popular Python PDF processing library across document pipelines
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
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 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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

54
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
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-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

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

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed

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