CVE-2026-84311

pypdf: Possible long runtimes/large memory usage when extracting XForm objects

Published Sep 1, 2026 CVSS 4.0 · 4.8 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability is located in pypdf/_page.py within the PageObject._extract_text and PageObject.extract_xform_text methods. A specially crafted PDF can force the library to walk a directed acyclic graph of reused XForm objects, where each form calls a child multiple times. This creates an exponential number of traversal paths that drastically increase runtime and memory usage. The effect is a denial of service through uncontrolled resource consumption, matching CWE-770.

Affected Systems

All releases of the py‑pdf:pypdf library before version 6.16.1 are affected. Any Python application that imports pypdf to parse or render PDFs from untrusted sources will be vulnerable, including web services, document conversion utilities, and email handlers that rely on the library for text extraction.

Risk and Exploitability

The CVSS score of 4.8 places the issue in the moderate range, and the EPSS score is not available, indicating no public exploits yet. Based on the description, it is inferred that the attack vector is the ingestion of a malicious PDF into any application that imports pypdf. The vulnerability can be triggered simply by providing such a PDF, causing the process to consume excessive CPU and memory, potentially leading to a service outage. The problem is not listed in CISA's KEV catalog, so it is not known to be actively exploited in the wild, but mitigation is recommended.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade pypdf to version 6.16.1 or newer
  • Validate or reject PDFs from untrusted sources before processing with pypdf
  • Enforce hard limits on CPU and memory usage for PDF handling routines
  • Monitor application logs for abnormal CPU or memory spikes during PDF processing

Generated by OpenCVE AI on September 2, 2026 at 04:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-763m-79hh-57f2 pypdf: Possible long runtimes/large memory usage when extracting XForm objects
History
Type Values Removed Values Added
CPEs cpe:2.3:a:pypdf_project:pypdf:*:*:*:*:*:*:*:* cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*
Vendors & Products Pypdf Project
Pypdf Project pypdf
Type Values Removed Values Added
First Time appeared Pypdf Project
Pypdf Project pypdf
CPEs cpe:2.3:a:pypdf_project:pypdf:*:*:*:*:*:*:*:*
Vendors & Products Pypdf Project
Pypdf Project pypdf
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}

cvssV3_1

{'score': 3.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Py-pdf
Py-pdf pypdf
Vendors & Products Py-pdf
Py-pdf pypdf
Type Values Removed Values Added
Weaknesses CWE-770
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Description 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.
Title pypdf: Possible long runtimes/large memory usage when extracting XForm objects
Weaknesses CWE-834
References
Metrics cvssV4_0

{'score': 4.8, 'vector': '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'}

Weaknesses
  • CWE-770

    Allocation of Resources Without Limits or Throttling

  • CWE-834

    Excessive Iteration

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 2, 2026, 4:02 PM
Reserved
Sep 1, 2026, 4:17 PM
Status
Analyzed
Published
Sep 1, 2026, 9:18 PM
Modified
Nov 2, 2026, 4:06 PM
Severity
Moderate
Public date
Sep 1, 2026, 8:03 PM