CVE-2026-119208

pypdf: Possible long runtimes/large memory usage for encrypted PDF files

Published Oct 29, 2026 CVSS 4.0 · 7.1 High EPSS < 1% KEV · Not listed
Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.21.3, pypdf can consume excessive time and memory when an application accesses the page count of a crafted encrypted PDF whose page tree declares a forged /Count value. Even after successful decryption, page-count retrieval trusts the unvalidated declared count instead of walking the page tree, allowing the attacker-controlled value to drive excessive work and memory use. This issue is fixed in version 6.21.3.

Analysis

AI-generated

Technical impact

pypdf, a pure‑Python PDF library, can consume excessive CPU time and memory when an application accesses the page count of a crafted encrypted PDF whose page tree declares a forged /Count value. After decryption, the library trusts the declared count instead of validating it by walking the page tree, allowing an attacker‑controlled value to drive arbitrarily large processing. This behaviour constitutes a resource exhaustion flaw.

Affected Systems

The vulnerability affects the py-pdf:pypdf library in all releases prior to 6.21.3; any downstream use of older versions is vulnerable.

Risk and Exploitability

The vulnerability carries a CVSS score of 7.1, indicating moderate‑to‑high severity, and it is not listed in the CISA KEV catalog. EPSS indicates a probability of exploitation of less than 1%. The attack requires a crafted encrypted PDF file; the likely vector is an application that loads or processes a PDF from a user or network source and then requests the page count. Once the file is decrypted, the forged /Count value causes the library to perform excessive work, potentially exhausting memory or CPU and denying service to the application or host.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade pypdf to version 6.21.3 or newer, which removes the reliance on unvalidated page counts.
  • Modify or configure the application to validate the page tree by traversing it instead of accepting the declared /Count value when processing PDFs from untrusted sources.
  • Implement resource limits (e.g., memory or CPU quotas) for processes that use pypdf, and monitor for unusually high resource consumption, especially after loading PDFs from external inputs.

Generated by OpenCVE AI on October 30, 2026 at 14:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-62m5-6wh8-28x7 pypdf has possible long runtimes/large memory usage for encrypted PDF files
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
CPEs cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Weaknesses CWE-1284
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
First Time appeared Py-pdf
Py-pdf pypdf
Vendors & Products Py-pdf
Py-pdf pypdf
Type Values Removed Values Added
Description pypdf is a free and open-source pure-python PDF library. Prior to 6.21.3, pypdf can consume excessive time and memory when an application accesses the page count of a crafted encrypted PDF whose page tree declares a forged /Count value. Even after successful decryption, page-count retrieval trusts the unvalidated declared count instead of walking the page tree, allowing the attacker-controlled value to drive excessive work and memory use. This issue is fixed in version 6.21.3.
Title pypdf: Possible long runtimes/large memory usage for encrypted PDF files
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'}

Weaknesses
  • CWE-1284

    Improper Validation of Specified Quantity in Input

  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 4, 2026, 1:45 AM
Reserved
Oct 29, 2026, 4:04 PM
Status
Analyzed
Published
Oct 29, 2026, 9:17 PM
Modified
Nov 4, 2026, 2:17 AM
Severity
Moderate
Public date
Oct 29, 2026, 8:41 PM