CVEfocus › CVE database › CVE-2023-36464

CVE-2023-36464Infinite Loop when a comment isn't followed by a character in pypdf

CVSS 6.2 MediumEPSS 0.3% (higher than 20% of CVEs)Published 2023-06-27Updated 2024-12-03Assigner: GitHub_M

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"")`.

CWE-835

What to do

Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

6Fixed
1Fix pending
2Under investigation
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10pypdfFix pendingUBUNTU-CVE-2023-36464
Ubuntu 26.04pypdfUnder investigationUBUNTU-CVE-2023-36464
Ubuntu 25.10pypdfWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2023-36464
Ubuntu 24.04pypdfUnder investigationUBUNTU-CVE-2023-36464
Debian 14pypdfFixed3.17.4-1DEBIAN-CVE-2023-36464
Debian 13pypdfFixed3.17.4-1DEBIAN-CVE-2023-36464
Debian 12pypdfFixed3.4.1-1+deb12u1DEBIAN-CVE-2023-36464
Debian 12pypdf2Fixed2.12.1-3+deb12u1DEBIAN-CVE-2023-36464
PyPI librarypypdfFixed3.9.0PYSEC-2026-3008
PyPI librarypypdf2Fixed3.9.0GHSA-4vvm-4w3v-6mr8

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.