CVE-2023-36464: py-pdf pypdf Infinite Loop
Vulnerability summary
CVE-2023-36464 is a medium (CVSS 6.2) Infinite Loop vulnerability in py-pdf pypdf. EPSS estimates a 0.35% chance of exploitation in the next 30 days, higher than 27.6% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 27-06-2023PublishedVulnerability first disclosed.
- 03-12-2024Last modifiedVulnerability information updated.
Description
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"")`.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · PypiEcosystem advisory · calculated6.2MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · UbuntuEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:HDiffers
- OSV · DebianEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:HDiffers
- NVDNIST5.5MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:HDiffers
EPSS trend
Probability
0.35%
Chance of exploitation in the next 30 days
Percentile
28%
Versus all other CVEs
30-day change
0.00 pp
From 0.35% on 21-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundPypdf
Maturity: poc
Weaknesses
CWE · root causeAffected systems
Debian2 products
- pypdf< 3.4.1-1+deb12u1 | < 3.17.4-1
- pypdf2< 2.12.1-3+deb12u1
PyPI2 products
- pypdf≥ 3.1.0, < 3.9.0
- pypdf2≥ 2.2.0, ≤ 3.0.1 | ≥ 2.2.0, < 3.9.0
Py-pdf1 product
- pypdfpypdf: < 3.90 | PyPDF2: >= 2.2.0
Pypdf_project1 product
- pypdf< 3.9.0
Pypdf2_project1 product
- pypdf2≥ 2.2.0 (No fix recorded)
Ubuntu1 product
- pypdfAll versions (No fix recorded)
6 vendors · 8 products
References
13 links- github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8X Refsource CONFIRMWEBREPORTExploitPatch
- github.com/py-pdf/pypdfPACKAGE
- pypi.org/project/pypdf2PACKAGE
- pypi.org/project/pypdfPACKAGE