Infinite loop in PyPDF - CVE-2022-24859
Published: June 19, 2023 / Updated: April 10, 2026
PyPDF
Detailed vulnerability description
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.
How to mitigate CVE-2022-24859
Sources
- https://github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79
- https://github.com/py-pdf/PyPDF2/pull/740
- https://github.com/py-pdf/PyPDF2/issues/329
- https://github.com/py-pdf/PyPDF2/releases/tag/1.27.5
- https://lists.debian.org/debian-lts-announce/2022/06/msg00001.html
- https://lists.debian.org/debian-lts-announce/2023/06/msg00013.html
- https://github.com/py-pdf/pypdf/security/advisories/GHSA-xcjx-m2pj-8g79