CVE-2025-62707: pypdf affected by possible infinite loop when reading DCT inline images without EOF marker

Published Oct 22, 2025
·
Updated

Impact

An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires parsing the content stream of a page which has an inline image using the DCTDecode filter.

Patches This has been fixed in pypdf==6.1.3.

Workarounds If you cannot upgrade yet, consider applying the changes from PR #3501.

Other sources

pypdf is a free and open-source pure-python PDF library. Prior to version 6.1.3, an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires parsing the content stream of a page which has an inline image using the DCTDecode filter. This has been fixed in pypdf version 6.1.3.

MITRE

Affected Software

2 affected componentsFixes available
pip/pypdf<6.1.3
6.1.3
Pypdf Project Pypdf<6.1.3

Event History

Oct 22, 2025
Advisory Published
via GitHub·07:40 PM
Data Sourced
via GitHub·07:40 PM
DescriptionWeaknessAffected Software
CVE Published
via MITRE·09:36 PM
Data Sourced
via MITRE·09:36 PM
DescriptionWeakness
Data Sourced
via NVD·10:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-62707?

CVE-2025-62707 is considered a serious vulnerability as it can lead to an infinite loop when parsing specific PDF files.

2

How do I fix CVE-2025-62707?

To fix CVE-2025-62707, update the pypdf package to version 6.1.3 or higher.

3

What kind of attack does CVE-2025-62707 enable?

CVE-2025-62707 enables an attacker to craft a malicious PDF that triggers an infinite loop during content stream parsing.

4

Which versions of pypdf are affected by CVE-2025-62707?

Versions of pypdf prior to 6.1.3 are affected by CVE-2025-62707.

5

What component of the PDF is involved in CVE-2025-62707?

CVE-2025-62707 specifically involves the parsing of inline images using the DCTDecode filter within PDF files.

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.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203