---
id: CVE-2026-54530
aliases:
  - GHSA-52x6-gq3r-vpf4
  - PYSEC-2026-3009
title: >-
  pypdf: Possible infinite loop when retrieving fonts for layout-mode text
  extraction
summary: >-
  pypdf: Possible infinite loop when retrieving fonts for layout-mode text
  extraction
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:50:48.282377637Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-52x6-gq3r-vpf4'
references:
  - url: 'https://github.com/py-pdf/pypdf/security/advisories/GHSA-52x6-gq3r-vpf4'
  - 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-52x6-gq3r-vpf4'
tags:
  - osv
  - pip
  - ghsa
epss: 0.00174
epssPercentile: 0.07159
cwe:
  - CWE-835
ingestedAt: '2026-07-07T15:41:58.373Z'
---

## Overview

### Impact

An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires extracting the text in layout mode.

### 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`
