CVE-2026-113793: pypdf: Possible infinite loop when removing tree items
Impact
An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires removing an object from a tree, for example an outline item.
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, removing an object from a crafted cyclic PDF tree, such as an outline item, 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 upgrading is not yet possible, apply the changes from PR #4188.