CVE-2026-41168

pypdf has possible long runtimes for wrong size values in cross-reference and object streams

Published Apr 22, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
Description
pypdf is a free and open-source pure-python PDF library. An attacker who uses a vulnerability present in versions prior to 6.10.1 can craft a PDF which leads to long runtimes. This requires cross-reference streams with wrong large `/Size` values or object streams with wrong large `/N` values. This has been fixed in pypdf 6.10.1. As a workaround, one may apply the changes from the patch manually.

Analysis

AI-generated

Technical impact

An attacker can craft a PDF that contains cross‑reference streams or object streams with incorrect large "/Size or "/N" values. When pypdf processes such a file it performs lengthy computations that can keep the interpreter busy for an extended period. This causes excessive CPU usage and potentially high memory consumption, effectively denying service to the application that parsed the PDF. The weakness is classified as CWE‑834 and CWE‑1284, indicating data structures are mishandled during parsing and that large or unsupported values can lead to exhaustion.

Affected Systems

Py‑pdf pypdf versions earlier than 6.10.1 are affected. Any system that imports these libraries and loads PDFs without additional validation is vulnerable. Versions 6.10.1 and later contain a fix that correctly handles the size fields.

Risk and Exploitability

The CVSS score of 6.9 reflects a moderate impact with limited exploitation complexity. The EPSS score is below 1%, and the vulnerability is not listed in CISA KEV, so there is no evidence of widespread exploitation yet. The likely attack vector is a malicious PDF delivered to an application that uses pypdf to read it, either locally or over a network, without user authentication. Once parsed, the malformed streams can keep the process busy or consume excessive resources, leading to availability degradation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the pypdf library to version 6.10.1 or newer, which includes the fix for incorrect size handling.
  • If an upgrade is not immediately possible, apply the patch changes manually by following the commit that resolves the issue, as recommended by the vendor.
  • Implement additional validation of PDF streams before parsing, ensuring that "/Size" and "/N" values fall within acceptable ranges, to mitigate the risk of resource exhaustion from malformed files.

Generated by OpenCVE AI on April 28, 2026 at 15:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-jj6c-8h6c-hppx pypdf has long runtimes for wrong size values in cross-reference and object streams
History
Type Values Removed Values Added
CPEs cpe:2.3:a:pypdf_project:pypdf:*:*:*:*:*:*:*:* cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*
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
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.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Description pypdf is a free and open-source pure-python PDF library. An attacker who uses a vulnerability present in versions prior to 6.10.1 can craft a PDF which leads to long runtimes. This requires cross-reference streams with wrong large `/Size` values or object streams with wrong large `/N` values. This has been fixed in pypdf 6.10.1. As a workaround, one may apply the changes from the patch manually.
Title pypdf has possible long runtimes for wrong size values in cross-reference and object streams
Weaknesses CWE-834
References
Metrics cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-1284

    Improper Validation of Specified Quantity in Input

  • CWE-834

    Excessive Iteration

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 23, 2026, 4:24 PM
Reserved
Apr 17, 2026, 4:34 PM
Status
Analyzed
Published
Apr 22, 2026, 9:17 PM
Modified
Nov 11, 2026, 11:10 PM
Severity
Moderate
Public date
Apr 22, 2026, 8:49 PM