Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
6.2
CVE-2023-36807: pypdf: Malicious PDFs Can Cause CPU to Freeze
CVE-2023-36807 · published 3 years ago
Summary
A vulnerability in pypdf version 2.10.5 allows an attacker to create a PDF that can freeze the program, consuming 100% of a single CPU core. This is fixed in version 2.10.6. Upgrade to the latest version or apply a temporary fix if you can't update immediately.
What to do
- Update mathieu fenniak pypdf2 to version 2.10.6.
- Update debian pypdf2 to version 2.10.7-1.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| pip | mathieu fenniak | pypdf2 |
2.10.5 Fix: upgrade to 2.10.6
|
| – | pypdf_project | pypdf |
2.10.5 cpe:2.3:a:pypdf_project:pypdf:2.10.5:*:*:*:*:*:*:* |
| Debian:12 | debian | pypdf2 |
< 2.10.7-1 Fix: upgrade to 2.10.7-1
|
| – | py-pdf | pypdf |
2.10.5 cpe:2.3:a:py-pdf:pypdf:2.10.5:*:*:*:*:*:*:* |
Original advisory text
Infinite Loop when reading malformed objects in pypdf
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.
References
- https://github.com/py-pdf/pypdf/commit/e6531a25325e7e0174b6a1ba03b57320b5227f6b
- https://github.com/advisories/GHSA-hm9v-vj3r-r55m
- https://github.com/py-pdf/pypdf/issues/1329 Third Party Advisory
- https://github.com/py-pdf/pypdf/pull/1331 Patch
- https://github.com/py-pdf/pypdf/security/advisories/GHSA-hm9v-vj3r-r55m Vendor Advisory
- https://security-tracker.debian.org/tracker/CVE-2023-36807 Vendor Advisory
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/36xxx/CVE-2023-36807... Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2023-36807 Vendor Advisory
Internet-facing
60 days
Internal
At next upgrade
- Not known to be exploited
- Needs hands-on effort to exploit
- Gives an attacker partial control
Type
CWE-835Loop with Unreachable Exit Condition ('Infinite Loop')
Timeline
Published30 Jun 2023
Updated4 Nov 2026
First seen6 Mar 2026
Sources
GHSA-hm9v-vj3r-r55m · GHSA
CVE-2023-36807 · NVD
DEBIAN-CVE-2023-36807 · OSV
CVE-2023-36807 · OSV
Track software like this
Free during beta