CVE-2023-46250: py-pdf pypdf Infinite Loop
Vulnerability summary
CVE-2023-46250 is a medium (CVSS 5.5) Infinite Loop vulnerability in py-pdf pypdf. EPSS estimates a 0.24% chance of exploitation in the next 30 days, higher than 14.5% of scored vulnerabilities.
Timeline
- 31-10-2023PublishedVulnerability first disclosed.
- 05-09-2024Last modifiedVulnerability information updated.
Description
pypdf is a free and open-source pure-python PDF library. An attacker who uses a vulnerability present in versions 3.7.0 through 3.16.4 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 when the pypdf-user manipulates an incoming malicious PDF e.g. by merging it with another PDF or by adding annotations. The issue was fixed in version 3.17.0. As a workaround, apply the patch manually by modifying `pypdf/generic/_data_structures.py`.
CVSS metrics
4 scores · 4 sources · 1 version- CVE.orgCNA5.1MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · PypiEcosystem advisory · calculated5.1MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · UbuntuEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.24%
Chance of exploitation in the next 30 days
Percentile
15%
Versus all other CVEs
30-day change
0.00 pp
From 0.24% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Ubuntu2 products
- pypdfAll versions (No fix recorded)
- pypdf2All versions (No fix recorded)
Py-pdf1 product
- pypdf≥ 3.7.0, < 3.17.0
Pypdf_project1 product
- pypdf≥ 3.7.0, < 3.17.0
PyPI1 product
- pypdf≥ 3.7.0, < 3.17.0
4 vendors · 5 products
References
9 links- github.com/py-pdf/pypdf/security/advisories/GHSA-wjcc-cq79-p63fX Refsource CONFIRMWEBREPORTVendor Advisory
- github.com/py-pdf/pypdf/commit/9b23ac3c9619492570011d551d521690de9a3e2dX Refsource MISCWEBREPORTPatch
- github.com/py-pdf/pypdfPACKAGE
- pypi.org/project/pypdfPACKAGE