---
id: CVE-2026-54531
aliases:
  - GHSA-m2v9-299j-rv96
  - PYSEC-2026-3022
title: 'pypdf: Possible infinite loop when processing outlines/bookmarks in writer'
summary: 'pypdf: Possible infinite loop when processing outlines/bookmarks in writer'
severity: medium
vendor: pypdf
product: pypdf
ecosystem: pip
affected:
  - pypdf < 6.13.0
patched:
  - pypdf 6.13.0
published: '2026-06-16'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:51:08.924739649Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-m2v9-299j-rv96'
references:
  - url: 'https://github.com/py-pdf/pypdf/security/advisories/GHSA-m2v9-299j-rv96'
  - url: 'https://github.com/py-pdf/pypdf/pull/3830'
  - url: 'https://github.com/py-pdf/pypdf'
  - url: 'https://github.com/py-pdf/pypdf/releases/tag/6.13.0'
  - url: 'https://github.com/advisories/GHSA-m2v9-299j-rv96'
tags:
  - osv
  - pip
  - ghsa
epss: 0.00174
epssPercentile: 0.07159
cwe:
  - CWE-835
ingestedAt: '2026-07-07T15:41:58.371Z'
---

## Overview

### Impact

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.

### Patches

This has been fixed in [pypdf==6.13.0](https://github.com/py-pdf/pypdf/releases/tag/6.13.0).

### Workarounds

If you cannot upgrade yet, consider applying the changes from PR [#3830](https://github.com/py-pdf/pypdf/pull/3830).

## Affected packages

- `pypdf < 6.13.0`

## Remediation

Upgrade to a patched release:

- `pypdf 6.13.0`
