CVE-2026-113792: pypdf Infinite Loop Vulnerability in PdfWriter.find_outline_item

pypdf Updated 21 Oct 2026

Summary

21/10/2026
Yes i
Moderate
6.0

CVE-2026-113792: pypdf: Possible infinite loop in PdfWriter.find_outline_item. Affects pypdf versions < 6.20.1. Fixed in 6.20.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

pypdf is a Python library used for manipulating PDF files. It allows users to create, modify, and extract information from PDFs. The library is widely utilized for its ease of use and comprehensive features, including the ability to handle outlines in PDF documents. However, a recent vulnerability has been identified that can lead to an infinite loop when using the PdfWriter.find_outline_item method, potentially causing applications to hang or crash.

Vulnerability Detail

The vulnerability arises from a flaw in the PdfWriter.find_outline_item method, which can be exploited by an attacker to craft a specially designed PDF file. When this method is called on the crafted PDF, it can lead to an infinite loop, causing the application to become unresponsive. This issue is classified under CWE-835, indicating that it can lead to excessive resource consumption and denial of service.

How To Fix

Latest published version: 6.21.2 as of 22 Oct 2026

pip install --upgrade "pypdf==6.21.2"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

6.20.1

This is the first release that contains the fix.

pip install --upgrade "pypdf==6.20.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading is not immediately possible, users can apply the changes from pull request #4188 on GitHub. This involves manually modifying the code in the PdfWriter class to prevent the infinite loop when processing outlines.

Conclusion

The pypdf library has a vulnerability that can lead to an infinite loop when processing certain PDF files. Users are advised to upgrade to version 6.20.1 to fix this issue. For those unable to upgrade immediately, a workaround is available through code modifications. Regular monitoring for vulnerabilities using tools like Vulert can help maintain application security.

See every vulnerability recorded for pypdf →

Share this vulnerability

FAQ

The vulnerability allows for an infinite loop when the find_outline_item method is called on a specially crafted PDF, leading to application hangs.

You can use the Vulert playground at Vulert Scanner to check if your application is affected without needing to sign up.

The CVSS score of this vulnerability is 6.0, indicating a moderate severity level.

Yes, the vulnerability has been fixed in pypdf version 6.20.1. Users should upgrade to this version to mitigate the issue.

If an upgrade is not possible, you can apply the changes from pull request #4188 to mitigate the risk temporarily.

Related vulnerabilities

Recent vulnerabilities recorded for pypdf.

How To Fix

Latest published version: 6.21.2 as of 22 Oct 2026

pip install --upgrade "pypdf==6.21.2"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

6.20.1

This is the first release that contains the fix.

pip install --upgrade "pypdf==6.20.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback