Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.21.3, pypdf can take excessive time to retrieve page labels from a crafted PDF containing a flat page-label number tree with many ranges. The page_labels property resolves each page independently and repeatedly scans the same /Nums array from the beginning, causing work to grow with both the page count and the number of label ranges. This issue is fixed in version 6.21.3.
Published: 2026-10-29
Score: 7.1 High
EPSS: n/a
KEV: No
Impact: Denial of Service via excessive CPU usage
Action: Patch
AI Analysis

Impact

A flaw in the pypdf library causes the page_labels property to scan the /Nums array repeatedly for each page, resulting in quadratic growth of processing time when a PDF contains many label ranges. This can cause an attacker to trigger long runtimes and exhaustion of CPU resources, meeting the definition of uncontrolled resource consumption (CWE-400). The consequence is a denial of service that impacts availability of any service that loads malformed PDFs.

Affected Systems

The vulnerability affects the py-pdf:pypdf library in any application using a version prior to 6.21.3. It applies to programs written in Python that import pypdf to read or modify PDF files, regardless of operating system.

Risk and Exploitability

With a CVSS score of 7.1 the flaw is considered moderate severity. No EPSS value is available, so the current exploitation probability cannot be quantified, but the fact that the issue can be triggered by a crafted PDF suggests that any system that processes PDFs from untrusted sources is at risk. The vulnerability is not listed in the CISA KEV catalog. An attacker can supply a PDF with many label ranges to abuse the algorithmic inefficiency and induce a DoS.

Generated by OpenCVE AI on October 29, 2026 at 21:28 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the pypdf library to version 6.21.3 or newer, which fixes the repeated scan issue.
  • If an immediate upgrade is not possible, validate and sanitize PDF inputs before passing them to pypdf, restricting the number of page-label ranges or rejecting documents that exceed a safe threshold.
  • In high-risk environments limit the CPU resources allocated to PDF processing or isolate the PDF parsing code in a sandbox to contain potential DoS attempts.

Generated by OpenCVE AI on October 29, 2026 at 21:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 29 Oct 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Py-pdf
Py-pdf pypdf
Vendors & Products Py-pdf
Py-pdf pypdf

Thu, 29 Oct 2026 20:45:00 +0000

Type Values Removed Values Added
Description pypdf is a free and open-source pure-python PDF library. Prior to 6.21.3, pypdf can take excessive time to retrieve page labels from a crafted PDF containing a flat page-label number tree with many ranges. The page_labels property resolves each page independently and repeatedly scans the same /Nums array from the beginning, causing work to grow with both the page count and the number of label ranges. This issue is fixed in version 6.21.3.
Title pypdf: Possible long runtimes when retrieving page labels
Weaknesses CWE-400
References
Metrics cvssV4_0

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


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-29T20:37:15.057Z

Reserved: 2026-10-29T16:04:48.729Z

Link: CVE-2026-119206

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-29T21:17:19.817

Modified: 2026-10-29T21:17:19.817

Link: CVE-2026-119206

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-29T21:30:15Z

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption