Skip to content
OpenAdvisories
Medium · 5.1 CVE-2023-46250 EUVD-2023-2830GHSA-wjcc-cq79-p63fPYSEC-2026-1834

pypdf possible Infinite Loop when PdfWriter(clone_from) is used with a PDF

Published Oct 31, 2023 · Updated Sep 5, 2024 · Assigned by GitHub_M

Description

pypdf is a free and open-source pure-python PDF library. An attacker who uses a vulnerability present in versions 3.7.0 through 3.16.4 can craft a PDF which leads to an infinite loop. This infinite loop blocks the current process and can utilize a single core of the CPU by 100%. It does not affect memory usage. That is, for example, the case when the pypdf-user manipulates an incoming malicious PDF e.g. by merging it with another PDF or by adding annotations. The issue was fixed in version 3.17.0. As a workaround, apply the patch manually by modifying `pypdf/generic/_data_structures.py`.

Affected products

VendorProductAffectedFixed
py-pdf pypdf >= 3.7.0, < 3.17.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 26.10 pypdf No fix yet —
Ubuntu 26.04 LTS pypdf No fix yet —
Ubuntu 25.10 pypdf No fix yet —
Ubuntu 24.04 LTS pypdf +1 No fix yet —
Ubuntu 22.04 LTS pypdf2 No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS pypdf2 No fix yet —
Ubuntu Pro 18.04 LTS pypdf2 No fix yet —
Ubuntu Pro 16.04 LTS pypdf2 No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI pypdf >= 3.7.0, < 3.17.0 3.17.0 GHSA-wjcc-cq79-p63f

References