Infinite loop in PyPDF - CVE-2022-24859

 

Infinite loop in PyPDF - CVE-2022-24859

Published: June 19, 2023 / Updated: April 10, 2026


Vulnerability identifier: #VU77514
CSH Severity: Medium
CVSS v4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2022-24859
CWE-ID: CWE-835
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to perform a denial of service (DoS) attack.

The vulnerability exists due to infinite loop in ContentStream._readInlineImage. A remote attacker can pass a specially crafted PDF file to the application, consume all available system resources and cause denial of service conditions.


Affected software

PyPDF
Ubuntu
python3-pypdf2 (Ubuntu package)
python-pypdf2 (Ubuntu package)

How to mitigate CVE-2022-24859

Install updates from vendor's website.

PyPDF - update to 1.27.5
python3-pypdf2 (Ubuntu package) - addressed in versions Ubuntu Pro, 1.26.0-3ubuntu1.20.04.1, 1.26.0-4ubuntu0.22.04.1
python-pypdf2 (Ubuntu package) - addressed in versions Ubuntu Pro, 1.26.0-3ubuntu1.20.04.1

External References

Related Security Bulletins