CVE-2023-46250
pypdf possible Infinite Loop when PdfWriter(clone_from) is used with a PDF
MEDIUM 5.1
At a glance
- Source
- NVD
- EPSS
- EPSS 0.24 % · percentile 15 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Modified
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`.
Weaknesses (CWE)
- CWE-835 — Loop with Unreachable Exit Condition
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 5.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | GitHub_M |
| CVSS 3.1 | MEDIUM 5.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | NVD · security-advisories@github.com (Secondary) |
| CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-wjcc-cq79-p63f — Possible Infinite Loop when PdfWriter(clone_from) is used with a PDF
- PYSEC-2026-1834 — Possible Infinite Loop when PdfWriter(clone_from) is used with a PDF
European references
- ENISA EUVD · EUVD-2023-2830
- GCVE · GCVE-0-2023-46250
Affected configurations (NVD CPE)
cpe:2.3:a:pypdf_project:pypdf:*:*:*:*:*:*:*:*≥ 3.7.0 < 3.17.0
Affected products
| Product | Versions |
|---|---|
| py-pdf · pypdf | affected >= 3.7.0, < 3.17.0 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |