Zero Radar
← feed
HighVulnerabilityCVE-2026-119208updated 30 Oct 2026, 23:08 UTC

pypdf can hang or exhaust memory on crafted encrypted PDFs

A specially crafted encrypted PDF file can make the pypdf Python library slow down a lot or use up a lot of memory when it reads the page count. This can freeze or crash a program that opens untrusted PDF files.

Fixed in pypdf 6.21.3 · out Official, 2 sources
SeverityHighCVSS 7.1 of 10
Being exploited?UnclearNo reports either way yet
Fix available?Yespypdf 6.21.3 · since 30 Oct 2026
How sure is this?Official, 2 sourcesBacked by an official source

How the attack works simplified

  1. 1Attacker crafts PDFEncrypted file with forged /Count value
  2. 2PDF reaches applicationUploaded or received for processing
  3. 3App reads page countCalls pypdf to get number of pages
  4. 4Excessive workForged count drives huge CPU and memory use
  5. ResultService slows down or crashes

What happened

pypdf, a pure-Python PDF library, trusts a forged /Count value in the page tree of encrypted PDFs when retrieving the page count, instead of walking the page tree, so attacker-controlled values drive excessive processing and memory use.

Why it is dangerous: Applications or services that automatically process PDFs from untrusted sources can have their runtime and memory consumed, causing slowdowns, hangs, or crashes (denial of service).

Are you affected?

You are affected if your application uses pypdf before version 6.21.3 to read the page count of encrypted PDF files that may come from untrusted sources.

Package / productAffected versionsFixed in
pypdf · pip< 6.21.36.21.3

What to do

  1. Upgrade pypdf to version 6.21.3 or later (pip install --upgrade pypdf)
  2. If you cannot upgrade yet, apply the changes from PR #4270 in the pypdf repository
  3. Limit resource use (time and memory) for PDF processing jobs that handle untrusted files

Timeline

  1. 29 Oct 2026, 21:17 UTC
    Publicly disclosed
  2. 29 Oct 2026, 21:17 UTC
    Reported by NVD · NVD
  3. 29 Oct 2026, 21:21 UTC
    Picked up by Zero Radar
  4. 30 Oct 2026, 23:08 UTC
    GitHub Advisory reported on it · GitHub Advisory
  5. 30 Oct 2026, 23:08 UTC
    Fixed version published: pypdf 6.21.3 · GitHub Advisory

Sources 2 reports, oldest first

Official vendor, government CERT or advisory database

Technical details

ID
CVE-2026-119208 · GHSA-62m5-6wh8-28x7
CVSS
7.1 / 10
Disclosed
29 Oct 2026, 21:17 UTC
On Zero Radar
29 Oct 2026, 21:21 UTC (4 min after disclosure)
Last change
30 Oct 2026, 23:08 UTC

The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works

pypdf can hang or exhaust memory on crafted encrypted PDFs · Zero Radar