CVE-2026-54531

pypdf: Possible infinite loop when processing outlines/bookmarks in writer

Published Jun 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. Prior to 6.13.0, an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires merging a file with outlines into a writer. This vulnerability is fixed in 6.13.0.

Analysis

AI-generated

Technical impact

pypdf is an open-source pure-Python PDF library that contains a flaw where merging a PDF file with outlines into a writer can trigger an unbounded loop. This loop repeatedly processes outline entries without end, consuming CPU cycles and potentially exhausting system resources. The impact is a denial of service to the application that performs the merge or to the environment in which the merge occurs, as the process may become unresponsive or crash.

Affected Systems

The vulnerability affects installations of the pypdf library prior to version 6.13.0. Any Python application or service that merges PDF documents and allows users to supply files with outlines or bookmarks is potentially impacted. Versions 6.13.0 and later contain the fix.

Risk and Exploitability

The CVSS score of 6.9 indicates a moderate severity. No EPSS score is published, and the issue is not in the CISA KEV catalog, suggesting limited public exploitation evidence. Attackers can exploit by creating a crafted PDF with malicious outline structures and delivering it to an application that uses pypdf's merge functionality. The vector is an application-level attack that could lead to denial of service, likely requiring the malicious PDF to be processed locally by the vulnerable process. The risk is mitigated by patching, but until then the flaw remains exploitable via crafted PDFs.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to pypdf version 6.13.0 or later
  • Validate or limit outline depth before merging; consider pre‑processing PDFs in a controlled sandbox
  • If upgrade is not immediately possible, run PDF processing in a separate process monitored by a watchdog that terminates the process after a timeout to prevent resource exhaustion

Generated by OpenCVE AI on June 22, 2026 at 22:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-m2v9-299j-rv96 pypdf: Possible infinite loop when processing outlines/bookmarks in writer
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
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
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 6.13.0, an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires merging a file with outlines into a writer. This vulnerability is fixed in 6.13.0.
Title pypdf: Possible infinite loop when processing outlines/bookmarks in writer
Weaknesses CWE-835
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 23, 2026, 4:11 PM
Reserved
Jun 15, 2026, 6:40 PM
Status
Analyzed
Published
Jun 22, 2026, 9:16 PM
Modified
Nov 2, 2026, 4:06 PM
Severity
Moderate
Public date
Jun 22, 2026, 8:26 PM