Intel

AIKIDO-2026-111085

pypdf is vulnerable to Denial of Service (DoS)

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jun 16, 2026
June 16, 2026

65

CVE Score

Medium

Denial of Service (DoS)

Are you affected? Scan for Free

TL;DR

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.

How do I fix this?

Upgrade the pypdf library to the patch version.

Who does this affect?

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.

Package

Versions

0.0.1 - 6.13.1

Fixed in 6.13.2

Background info

pypdf is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 6.13.1.

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea