CVE-2023-36807: py-pdf pypdf Infinite Loop
Vulnerability summary
CVE-2023-36807 is a medium (CVSS 6.5) Infinite Loop vulnerability in py-pdf pypdf. EPSS estimates a 0.57% chance of exploitation in the next 30 days, higher than 46.5% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 30-06-2023PublishedVulnerability first disclosed.
- 06-11-2024Last modifiedVulnerability information updated.
Description
pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. In version 2.10.5 an attacker who uses this vulnerability 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 if the user extracted metadata from such a malformed PDF. Versions prior to 2.10.5 throw an error, but do not hang forever. This issue was fixed with https://github.com/py-pdf/pypdf/pull/1331 which has been included in release 2.10.6. Users are advised to upgrade. Users unable to upgrade should modify `PyPDF2/generic/_data_structures.py::read_object` to an an error throwing case. See GHSA-hm9v-vj3r-r55m for details.
CVSS metrics
5 scores · 5 sources · 1 version- CVE.orgCNA6.2MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · PypiEcosystem advisory · calculated6.2MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · UbuntuEcosystem advisory · calculated6.2MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · DebianEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.57%
Chance of exploitation in the next 30 days
Percentile
47%
Versus all other CVEs
30-day change
0.00 pp
From 0.57% 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
Debian1 product
- pypdf2< 2.10.7-1
Py-pdf1 product
- pypdf2.10.5
Pypdf_project1 product
- pypdf2.10.5
PyPI1 product
- pypdf2≥ 2.10.5, < 2.10.6
Ubuntu1 product
- pypdf2< 1.25.1-1 | < 1.25.1-1ubuntu0.1~esm2 | < 1.26.0-2 | < 1.26.0-2ubuntu0.1~esm2 | < 1.26.0-3ubuntu1.20.04.1 | < 1.26.0-4ubuntu0.22.04.1
5 vendors · 5 products
References
11 links- github.com/py-pdf/pypdf/security/advisories/GHSA-hm9v-vj3r-r55mX Refsource CONFIRMWEBREPORTExploitMitigationPatchVendor Advisory
- github.com/py-pdf/pypdfPACKAGE
- pypi.org/project/pypdf2PACKAGE