pypdf PDF library can hang forever on a crafted file
A specially crafted PDF file can make the pypdf Python library get stuck in an endless loop, freezing the program that processes it. Nothing in the material says data is stolen or systems are taken over.
| Severity | HighCVSS 7.1 of 10 |
|---|---|
| Being exploited? | UnclearNo reports either way yet |
| Fix available? | Yespypdf 6.21.4 · since 30 Oct 2026 |
| How sure is this? | Official, 2 sourcesBacked by an official source |
How the attack works simplified
- 1Attacker crafts PDFFile contains a cyclic dictionary structure
- 2Application processes fileCode clones or duplicates the PDF object
- 3pypdf traverses cycleVisited-object check misses some source cycles
- 4Process hangsInfinite loop consumes the process indefinitely
- ResultProcessing hangs, service becomes unavailable
What happened
In pypdf before 6.21.4, cloning or duplicating a crafted, cyclic DictionaryObject can cause an infinite loop, because the clone traversal checks generated destination references instead of the original source references, letting some source cycles bypass the visited-object check.
Are you affected?
You are affected if you use the pypdf Python package older than 6.21.4 to clone or duplicate DictionaryObject content from PDF files you do not fully trust.
| Package / product | Affected versions | Fixed in |
|---|---|---|
| pypdf · pip | < 6.21.4 | 6.21.4 |
What to do
- Update pypdf to version 6.21.4 or later (pip install --upgrade pypdf)
- If you cannot upgrade yet, apply the changes from PR #4288 in the pypdf repository
- Set timeouts on PDF processing jobs so a hung file cannot block your service indefinitely
Timeline
- 29 Oct 2026, 21:17 UTCPublicly disclosed
- 29 Oct 2026, 21:17 UTCReported by NVD · NVD
- 29 Oct 2026, 21:21 UTCPicked up by Zero Radar
- 30 Oct 2026, 23:12 UTCGitHub Advisory reported on it · GitHub Advisory
- 30 Oct 2026, 23:12 UTCFixed version published: pypdf 6.21.4 · GitHub Advisory
Sources 2 reports, oldest first
Official vendor, government CERT or advisory database
- CVE-2026-119205NVD · 29 Oct 2026, 21:17 UTC
- pypdf has possible infinite loop when cloning dictionariesGitHub Advisory · 30 Oct 2026, 23:12 UTC
Technical details
- ID
- CVE-2026-119205 · GHSA-mfr5-77xh-9j7h
- 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:12 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