CWE
835
Advisory Published
Advisory Published
Updated

CVE-2022-24859: Manipulated inline images can cause Infinite Loop in PyPDF2

First published: Mon Apr 18 2022(Updated: )

### Impact An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop if the PyPDF2 user wrote the following code: ```python from PyPDF2 import PdfFileReader, PdfFileWriter from PyPDF2.pdf import ContentStream reader = PdfFileReader("malicious.pdf", strict=False) for page in reader.pages: ContentStream(page.getContents(), reader) ``` ### Patches [`PyPDF2==1.27.5`](https://pypi.org/project/PyPDF2) and later are patched. Credits to [Sebastian Krause](https://github.com/sekrause) for finding ([issue](https://github.com/py-pdf/PyPDF2/issues/329)) and fixing ([PR](https://github.com/py-pdf/PyPDF2/pull/740)) it.

Credit: security-advisories@github.com security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
Pypdf2 Project Pypdf2<1.27.5
Debian Debian Linux=9.0
pip/PyPDF2<1.27.5
1.27.5

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is CVE-2022-24859?

    CVE-2022-24859 is a vulnerability in PyPDF2, an open source python PDF library, that allows an attacker to craft a malicious PDF file that can cause an infinite loop in the software.

  • How does CVE-2022-24859 impact PyPDF2?

    CVE-2022-24859 can lead to an infinite loop in PyPDF2 if a specially crafted PDF file is processed by the software.

  • What versions of PyPDF2 are affected by CVE-2022-24859?

    Versions of PyPDF2 prior to 1.27.5 are affected by CVE-2022-24859.

  • How severe is CVE-2022-24859?

    CVE-2022-24859 has a severity rating of 5.5, which is considered medium.

  • How can I fix CVE-2022-24859?

    To fix CVE-2022-24859, update PyPDF2 to version 1.27.5 or newer.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203