CVE-2026-113792: pypdf: Possible infinite loop in PdfWriter.find_outline_item
Impact
An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires calling findoutlineitem on a PdfWriter.
Patches
This has been fixed in pypdf==6.20.1.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #4188.
Other sources
pypdf is a free and open-source pure-python PDF library. Prior to 6.20.1, calling PdfWriter.findoutlineitem on a crafted PDF with a cyclic outline hierarchy can enter an infinite loop and block the current process. This issue is fixed in version 6.20.1.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/pypdfto a version that resolves this vulnerability.Fixed in 6.20.1 - Upgrade
Upgrade
pypdfto a version that resolves this vulnerability.Fixed in 6.20.1 - Compensating control
If you cannot upgrade to pypdf 6.20.1, apply the changes from PR #4188.