CVE-2023-36807
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.
Weakness
- CWE-835: Loop with Unreachable Exit Condition
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | no |
| Technical impact | partial |
| Scored | 2024-11-06 |
Timeline
- 2023-06-30Published by the CNA18:38 UTC
- 2023-06-30GitHub advisory published (GHSA-hm9v-vj3r-r55m)same day
- 2024-11-06CISA SSVC decision recorded495 days after publication
Exploit and advisory records
GitHub advisory GHSA-hm9v-vj3r-r55m, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| PyPI pypdf2 | from 2.10.5 before 2.10.6 | 2.10.6 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| py-pdf pypdf | 2.10.5no fix listed | not listed |
References
- https://github.com/py-pdf/pypdf/pull/1331
- https://github.com/py-pdf/pypdf/security/advisories/GHSA-hm9v-vj3r-r55m
- https://github.com/py-pdf/pypdf/issues/1329
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2023-36807'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2023-36807'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2023-36807'curl 'https://api.contrastcyber.com/cve_products/CVE-2023-36807'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).