CVE-2026-27024: pypdf has a possible infinite loop when processing TreeObject
Impact
An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires accessing the children of a TreeObject, for example as part of outlines.
Patches
This has been fixed in pypdf==6.7.1.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #3645.
Other sources
pypdf is a free and open-source pure-python PDF library. Prior to 6.7.1, an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires accessing the children of a TreeObject, for example as part of outlines. This vulnerability is fixed in 6.7.1.
— NVD
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2026-27024?
CVE-2026-27024 is classified as a medium severity vulnerability due to its potential to create an infinite loop when processing malicious PDF files.
How do I fix CVE-2026-27024?
To remediate CVE-2026-27024, upgrade pypdf to version 6.7.1 or later.
What versions of pypdf are affected by CVE-2026-27024?
CVE-2026-27024 affects pypdf versions prior to 6.7.1.
How does CVE-2026-27024 impact application security?
CVE-2026-27024 can lead to application denial of service by causing infinite loops when handling specially crafted PDF files.
Is CVE-2026-27024 exploitable in production environments?
Yes, CVE-2026-27024 can be exploited in production environments if the application processes untrusted PDFs.