Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. pypdf
  4. ›
  5. CVE-2023-36464

CVE-2023-36464: Loop with Unreachable Exit Condition ('Infinite Loop')

June 27, 2023 (updated July 6, 2023)

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

References

  • github.com/py-pdf/pypdf/pull/1828
  • github.com/py-pdf/pypdf/pull/969
  • github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8
  • nvd.nist.gov/vuln/detail/CVE-2023-36464

Code Behaviors & Features

Detect and mitigate CVE-2023-36464 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 3.9.0

Fixed versions

  • 3.9.0

Solution

Upgrade to version 3.9.0 or above.

Impact 5.5 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')

Source file

pypi/pypdf/CVE-2023-36464.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:18 +0000.