pypdf is vulnerable to Denial of Service (DoS)
65
Medium Risk
The _flatten routine walks /Pages trees when a PdfReader builds its page list. A crafted PDF can create a multi-hop /Pages cycle that bypasses the existing single-parent check and drives unbounded recursion. Before the fix, accessing reader.pages could raise RecursionError or, under a partially consumed C stack, terminate the worker process with SIGSEGV. The fix tracks visited /Pages nodes during traversal and raises PdfReadError when a cycle is detected.
You are affected if you are using a version that falls within the vulnerable range and parse untrusted PDFs with operations that enumerate pages, such as accessing reader.pages.
pypdf is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 6.13.1.
Upgrade the pypdf library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant