Live threats

All CVEs / Py-pdf

CVE-2023-36464Py-pdf Pypdf

Medium 5.5

Priority
33
CVSS 3.1
5.5
EPSS
0.3%
probability of exploitation in 30 days · percentile 20
Auth required
Yes
Published
Jun 27, 2023
Updated
Nov 2, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-835
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

What happens

pypdf is an open source, pure-python PDF library. In affected versions an attacker may craft a PDF which leads to an infinite loop if `__parse_content_stream` is executed. That is, for example, the case if the user extracted text from such a PDF. This issue was introduced in pull request #969 and resolved in pull request #1828. Users are advised to upgrade. Users unable to upgrade may modify the line `while peek not in (b"\r", b"\n")` in `pypdf/generic/_data_structures.py` to `while peek not in (b"\r", b"\n", b"")`.

Original NVD text.

What to do

  1. Apply the vendor's security update for Pypdf.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI pypdf ≥ 3.1.0 < 3.9.0 3.9.0 pip install "pypdf>=3.9.0"
PyPI pypdf ≥ 3.1.0 < 3.9.0 3.9.0 pip install "pypdf>=3.9.0"
PyPI pypdf2 ≥ 2.2.0 ≤ 3.0.1 no fixed version —
PyPI pypdf2 ≥ 2.2.0 < 3.9.0 3.9.0 pip install "pypdf2>=3.9.0"

Per OSV / GitHub Advisories (GHSA-4vvm-4w3v-6mr8, PYSEC-2026-3008, PYSEC-2026-1835). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
py-pdfpypdf< 3.9.0
pypdf2_projectpypdf2≥ 2.2.0

Official sources

References

Links published by the sources. Open them with care.