Zero Radar
← feed
HighVulnerabilityCVE-2026-119207updated 30 Oct 2026, 23:09 UTC

pypdf can run out of memory when reading a crafted PDF file

A specially crafted, broken PDF file can make the pypdf Python library use huge amounts of memory while it reads the file. This can slow down or crash the program that opens it.

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 sends PDFCrafted file contains malformed dictionary
  2. 2App parses filepypdf runs in strict mode
  3. 3Errors balloonNested exception text repeats in messages
  4. 4Memory exhaustedProcess consumes excessive memory
  5. ResultService memory exhaustion, possible crash

What happened

In pypdf before 6.21.3, strict mode parsing of a malformed PDF dictionary repeats nested exception text in newly raised errors, so a small malformed dictionary can expand into very large error messages that consume excessive memory.

Why it is dangerous: A malicious PDF sent to a service that parses PDFs with pypdf can exhaust server memory, causing denial of service for that service.

Are you affected?

You are affected if you use pypdf versions before 6.21.3 to parse untrusted PDF files, particularly with strict mode enabled.

Package / productAffected versionsFixed in
pypdf · pip< 6.21.36.21.3

What to do

  1. Update pypdf to version 6.21.3 or later
  2. If you cannot upgrade yet, apply the changes from pull request #4265 in the pypdf repository
  3. Avoid parsing untrusted PDF files with older pypdf versions

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:09 UTC
    GitHub Advisory reported on it · GitHub Advisory
  5. 30 Oct 2026, 23:09 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-119207 · GHSA-4vqv-7265-gm2w
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:09 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 run out of memory when reading a crafted PDF file · Zero Radar