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 VendorProductAffected 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.
Fix within
Internet-facing 60 days
Internal At next upgrade
  • Not known to be exploited
  • Needs hands-on effort to exploit
  • Gives an attacker partial control
Severity
6.2 Medium
Exploitation
<1% chance of attack within 30 days
Type
CWE-835Loop with Unreachable Exit Condition ('Infinite Loop')
Timeline
Published30 Jun 2023
Updated4 Nov 2026
First seen6 Mar 2026
Track software like this
Free during beta