CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-84310

CVE-2026-84310: Algorithmic Complexity Exhaustion in pypdf

Alon Barad
Alon Barad
Software Engineer

Sep 2, 2026·7 min read·1 visit

Executive Summary (TL;DR)

A resource exhaustion vulnerability in pypdf allows local and remote denial of service via unbounded recursion in outline retrieval and exponential node expansion in Form XObject parsing.

An algorithmic complexity vulnerability in the pypdf library before version 6.16.1 allows remote or local attackers to cause an application denial of service. The flaw is triggered via maliciously crafted PDF documents that utilize either deeply nested outlines or exponential Directed Acyclic Graph (DAG) structures in Form XObjects.

Vulnerability Overview

The pypdf library is an open-source, pure-Python library designed to parse, split, merge, and manipulate PDF documents. It is widely used in automated ingestion pipelines, search indexing systems, and document processing backends. These deployment scenarios expose a significant attack surface, as backend services often automatically process untrusted, user-supplied PDF documents.

This vulnerability, tracked as CVE-2026-84310, involves two distinct algorithmic complexity exhaustion vectors that can result in complete denial of service. The affected components are located in the document outline parsing routine (_get_outline in pypdf/_doc_common.py) and the text extraction parser (_extract_text in pypdf/_page.py). By exploiting these execution paths, an attacker can craft a highly compact PDF document that consumes disproportionate system resources.

These issues are classified under CWE-405 (Asymmetric Resource Consumption) and CWE-834 (Excessive Iteration). When a vulnerable version of pypdf processes a malicious document, the parsing thread blocks indefinitely, consuming 100% CPU and exhausting system memory. This makes the target service completely unresponsive to subsequent requests.

Root Cause Analysis of the Algorithmic Complexity Flaws

The first vector resides within the _get_outline() method of the _doc_common.py module. PDF document outlines use dictionary objects linked to other sibling and child outline nodes. The parsing algorithm traverses these elements recursively. While the parser utilized a set of object IDs to prevent infinite loops from circular references, it lacked any global limits on traversal depth or total node counts. An attacker could construct an outline hierarchy with tens of thousands of unique nested items, forcing excessive recursive stack expansion that results in a Python RecursionError or exhaustive CPU consumption.

The second, more significant vector exists in the Form XObject processing implementation of the text extraction routines. PDF documents support Form XObjects, which are self-contained stream objects representing reusable vector or text graphics. When extracting text, pypdf recursively resolves and parses these nested Form XObjects. To defend against infinite recursion loops, the original execution logic maintained a tracking set of active object IDs named known_ids.

The critical bug was located in how this tracking state was cleaned up during execution. When a Form XObject completed processing, its ID was discarded from the known_ids set inside a finally block: known_ids.discard(xform_id). This cleanup strategy successfully prevented active cyclic loops, but it completely failed to track already-visited nodes across sister branches in the tree. Consequently, the logic was highly vulnerable to Directed Acyclic Graph (DAG) expansion attacks.

An attacker can register a linear chain of Form XObjects where each parent object references the next child object multiple times. Because pypdf discards a child ID from its tracking set as soon as that branch completes, it must fully re-parse the child object every single time it is referenced. This causes the total traversal complexity to scale exponentially ($2^{depth}$) relative to the number of defined objects. A document containing only 30 unique Form XObjects can force billions of recursive parsing steps, freezing the process indefinitely.

Code-Level Analysis and Patch Verification

Prior to version 6.16.1, the vulnerable tracking logic in pypdf/_page.py processed Form XObjects with a local tracking mechanism that did not maintain a global step counter. The vulnerable block structured the parsing of nested forms as follows:

# Vulnerable tracking pattern in pypdf/_page.py
known_ids.add(xform_id)
try:
    # Recursively extract text from the XObject
    text = self.extract_xform_text(xform_id, ...)
finally:
    # The object ID is removed, allowing duplicate processing in sister branches
    known_ids.discard(xform_id)

The security patch introduced in version 6.16.1 fixes both execution paths by implementing a state-tracking dataclass and establishing strict global boundaries. The patch introduces _TraversalState to track execution metrics dynamically across recursive calls:

# Patched traversal state implementation
class _TraversalState:
    def __init__(self) -> None:
        self.entry_count = 0
        self.has_logged = False

In pypdf/_doc_common.py, the developers enforced strict caps on outline parsing, setting OUTLINE_MAX_ENTRIES = 100_000 and OUTLINE_MAX_DEPTH = 100. During recursion, the code now checks whether depth > OUTLINE_MAX_DEPTH or traversal_state.entry_count > OUTLINE_MAX_ENTRIES and immediately raises a LimitReachedError if these thresholds are exceeded.

For the text extraction component, the developers established a limit of MAX_XFORM_INVOCATIONS_PER_EXTRACTION = 5_000. The function _extract_text__xform now increments the global traversal_state.entry_count at each step. If the count exceeds the threshold, the parser terminates processing for that branch, logs a warning, and returns an empty string. This ensures that even the most complex DAG structures execute in linear time, capped at 5,000 operations, resolving the exponential complexity flaw.

Exploitation Mechanics and Proof-of-Concept Analysis

Exploiting this vulnerability does not require complex payloads, shellcode, or specific memory layouts. The attack relies entirely on structural parsing properties. An attacker constructs a valid PDF containing a small number of Form XObject streams where each stream contains multiple reference commands (Do operators) targeting the next stream in the hierarchy.

The diagram illustrates how a shallow DAG structure containing only three distinct Form XObjects (F0, F1, and F2) leads to multiple redundant evaluations. At each layer, the processing complexity doubles. An exploit script generates a PDF with a depth of 25 to 30, which fits into a file of less than 10 kilobytes. When parsed, this file forces $2^{30}$ recursive calls, completely blocking the execution thread.

Because the Python interpreter is bound by the Global Interpreter Lock (GIL), a single-threaded web server or celery worker executing this operation will block entirely. This stops the processing of all other concurrent requests handled by that worker. The CPU usage for the worker spikes to 100%, and memory allocations accumulate as stack frames build, leading to potential system instability.

Impact Assessment and Risk Characterization

The primary impact of CVE-2026-84310 is a local and remote denial of service. While classified with a CVSS v4.0 base score of 4.8 (Medium), the operational impact on enterprise document ingestion pipelines can be significant. If a web application permits anonymous file uploads and automatically processes them using pypdf (for example, to index text or parse metadata), an attacker can easily exhaust the application's processing resources.

This vulnerability does not allow remote code execution, privilege escalation, or unauthorized data access. However, because pypdf is widely integrated into web application frameworks, search engine spiders, and document management systems, the footprint of affected software is broad.

Additionally, memory utilization during a DAG expansion attack scales significantly. The rapid allocation of nested tracking structures can trigger the host operating system's Out-Of-Memory (OOM) killer. If the vulnerable application runs in a shared container environment, the OOM killer may terminate the entire container or adjacent critical processes, amplifying the scope of the denial of service.

Remediation and Defense-in-Depth Mitigation

The definitive remediation for CVE-2026-84310 is to upgrade pypdf to version 6.16.1 or later. This release introduces the necessary structural constraints to prevent execution loops from consuming excessive resources. Ensure all deployment requirements files are updated to specify pypdf>=6.16.1.

If upgrading is not immediately possible, implement the following operational defenses:

  1. Enforce aggressive processing timeouts. Wrap all PDF parsing tasks in a separate process using Python's multiprocessing library or an external task runner with a strict execution time limit (such as 10 seconds). This ensures that any thread entering an infinite recursion loop is forcefully terminated before it starves the rest of the system.

  2. Minimize exposure of vulnerable functions. If your application only requires merging or splitting PDF files, avoid calling page.extract_text() or reading reader.outline on files uploaded by untrusted users. These are the specific endpoints that trigger the vulnerable recursive routines.

  3. Use static analysis rules on edge gateways. Implement detection rules at your application boundaries or Web Application Firewall (WAF) to inspect uploaded PDF files for excessive occurrences of /Subtype /Form references combined with recursive Do operators within the same data streams.

Official Patches

py-pdfOfficial patch containing TraversalState logic for both outlines and Form XObjects.

Fix Analysis (1)

Technical Appendix

CVSS Score
4.8/ 10
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

Affected Systems

Applications utilizing the pypdf Python library for PDF parsing, text extraction, or outline processing.

Affected Versions Detail

Product
Affected Versions
Fixed Version
pypdf
py-pdf
< 6.16.16.16.1
AttributeDetail
CWE IDCWE-405, CWE-834
Attack VectorLocal / User Interaction (Parsing a maliciously crafted PDF file)
CVSS v4.0 Score4.8
ImpactDenial of Service (CPU & Memory Exhaustion)
Exploit StatusProof of Concept (PoC) documented
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-405
Asymmetric Resource Consumption (Amplification)

The software does not control the allocation or processing of a limited resource, allowing a tiny input to result in disproportionately large consumption of system resources.

Known Exploits & Detection

GitHub Pull RequestThe regression tests contained in this pull request describe the precise steps to construct the exponential Directed Acyclic Graph (DAG) structures using Form XObjects to trigger the CPU hang.

References & Sources

  • [1]GitHub Advisory GHSA-23w6-3w8w-8484
  • [2]Fix Commit
  • [3]Pull Request #3966
  • [4]Release 6.16.1
  • [5]CVE-2026-84310 Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•14 minutes ago•CVE-2026-84311
4.8

CVE-2026-84311: Algorithmic Complexity Denial of Service in pypdf

CVE-2026-84311 (GHSA-763m-79hh-57f2) is an algorithmic complexity Denial of Service (DoS) vulnerability in the pypdf library. Prior to version 6.16.1, the library does not place limits on iterations during the parsing of PDF document outlines and recursive Form XObject (XForm) expansions. An attacker can craft a malicious, highly compressed PDF document containing nested structures which, when parsed, trigger exponential iteration paths, resulting in severe CPU and memory exhaustion.

Amit Schendel
Amit Schendel
0 views•7 min read
•about 2 hours ago•CVE-2026-77567
8.1

CVE-2026-77567: Multi-Factor Authentication Bypass in Filament App-Based MFA

An authentication bypass vulnerability exists in Filament's app-based (TOTP/authenticator) multi-factor authentication (MFA) system when recovery codes are enabled. This allow attackers possessing primary credentials to bypass the second-factor authentication check entirely by manipulating the Livewire state during the challenge-form validation lifecycle.

Alon Barad
Alon Barad
3 views•7 min read
•about 3 hours ago•CVE-2026-84307
3.7

CVE-2026-84307: Authentication Oracle and Multi-Factor Authentication Challenge Leak in Filament

An authentication oracle vulnerability exists in Filament before 4.12.5 and 5.7.5. The application initiates MFA challenge workflows prior to verifying user authorization policies, allowing unauthenticated attackers to validate guessed credentials.

Alon Barad
Alon Barad
3 views•6 min read
•about 4 hours ago•CVE-2026-84306
6.5

CVE-2026-84306: Multi-Factor Authentication Bypass via Replay Attack in Filament

A multi-factor authentication bypass vulnerability exists in Filament (Laravel full-stack framework panels) due to improper time-step tracking of Time-Based One-Time Password (TOTP) codes. By submitting valid TOTP codes from an older time window within the drift allowance, an attacker with a user's password can bypass the single-use MFA guarantee and obtain unauthorized account access.

Alon Barad
Alon Barad
3 views•7 min read
•about 5 hours ago•CVE-2026-19418
7.3

CVE-2026-19418: Broken Access Control and Cross-Site Request Forgery in TYPO3 CMS Core

CVE-2026-19418 is a high-severity origin validation vulnerability in TYPO3 CMS that enables Cross-Site Request Forgery (CSRF) and access control bypasses. Due to architectural consolidation of entry points in version 13.0, the core ReferrerEnforcer fails to isolate backend endpoints from the frontend, allowing an attacker with frontend script execution capabilities to perform unauthorized administrative actions.

Alon Barad
Alon Barad
4 views•5 min read
•about 6 hours ago•CVE-2026-84304
8.7

CVE-2026-84304: Uncontrolled Resource Consumption in gRPC-Go HTTP/2 Frame Processing

CVE-2026-84304 is a high-severity uncontrolled resource consumption vulnerability in gRPC-Go, the Go implementation of the gRPC framework. The issue stems from a memory amplification flaw inside the HTTP/2 DATA frame processing subsystem. Remote, unauthenticated attackers can exploit this vulnerability by sending a high volume of heavily fragmented, tiny DATA frames within multiplexed concurrent streams. This causes gRPC-Go servers to allocate excessive internal metadata structures on the Go heap, leading to severe heap memory amplification, intense garbage collection thrashing, and process termination due to Out-of-Memory (OOM) conditions.

Alon Barad
Alon Barad
3 views•7 min read