pypdf is vulnerable to Denial of Service (DoS)
65
CVE Score
Medium
Denial of Service (DoS)
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.
Upgrade the pypdf library to the patch version.
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.
0.0.1 - 6.13.1
Fixed in 6.13.2pypdf is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 6.13.1.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.