CVE-2026-22691

pypdf has possible long runtimes for malformed startxref

Published Jan 10, 2026 CVSS 4.0 · 2.7 Low EPSS < 1% KEV · Not listed
Description
pypdf is a free and open-source pure-python PDF library. Prior to version 6.6.0, pypdf has possible long runtimes for malformed startxref. An attacker who uses this vulnerability can craft a PDF which leads to possibly long runtimes for invalid startxref entries. When rebuilding the cross-reference table, PDF files with lots of whitespace characters become problematic. Only the non-strict reading mode is affected. Only the non-strict reading mode is affected. This issue has been patched in version 6.6.0.

Analysis

AI-generated

Technical impact

pypdf, a pure‑Python PDF library, contains a flaw that allows an attacker to craft a PDF with a malformed startxref section. When the library processes such a file in non‑strict mode, it may spend an excessive amount of time rebuilding the cross‑reference table, especially if many whitespace characters are present. This unusually long runtime can consume CPU resources and potentially deny service to legitimate users.

Affected Systems

Any system that uses the pypdf package prior to version 6.6.0 is affected. The vulnerability is present in all releases of the library bundled with the py‑pdf vendor and applies only to the non‑strict reading mode. Applications that import pypdf to parse user‑supplied PDFs are at risk unless they explicitly enforce strict mode or otherwise protect the parsing operation.

Risk and Exploitability

The CVSS score is 2.7, indicating a moderate impact. At the time of assessment the exploitation probability is very low (<1 %) and the vulnerability is not listed in CISA’s KEV catalog. Attackers would need to supply the crafted PDF to the target system; if accepted, the long reconstruction phase could lead to denial of service. The issue has already been fixed in version 6.6.0, so upgrading provides a definitive mitigation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade pypdf to version 6.6.0 or later
  • If an upgrade is not yet possible, reject or sanitise PDFs that contain extensive whitespace before passing them to pypdf
  • Configure applications to use pypdf’s strict mode to avoid the vulnerable code path

Generated by OpenCVE AI on April 18, 2026 at 07:12 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-4f6g-68pf-7vhv pypdf has possible long runtimes for malformed startxref
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': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}

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
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', '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
Description pypdf is a free and open-source pure-python PDF library. Prior to version 6.6.0, pypdf has possible long runtimes for malformed startxref. An attacker who uses this vulnerability can craft a PDF which leads to possibly long runtimes for invalid startxref entries. When rebuilding the cross-reference table, PDF files with lots of whitespace characters become problematic. Only the non-strict reading mode is affected. Only the non-strict reading mode is affected. This issue has been patched in version 6.6.0.
Title pypdf has possible long runtimes for malformed startxref
Weaknesses CWE-1333
CWE-400
References
Metrics cvssV4_0

{'score': 2.7, '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/E:U'}

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jan 12, 2026, 4:48 PM
Reserved
Jan 8, 2026, 7:23 PM
Status
Analyzed
Published
Jan 10, 2026, 5:16 AM
Modified
Nov 2, 2026, 4:06 PM
Severity
Moderate
Public date
Jan 10, 2026, 4:46 AM