CVE-2026-102995: pypdf Large Memory Consumption Vulnerability

pypdf Updated 01 Oct 2026

Summary

01/10/2026
Yes i
High
8.7

CVE-2026-102995: pypdf: Possible large memory usage for large /ToUnicode streams (Follow-up 2). Affects pypdf versions < 6.18.1. Fixed in 6.18.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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

pypdf is a Python library designed for PDF manipulation, including reading, writing, and modifying PDF files. It provides functionalities such as text extraction, merging, and splitting PDFs. However, it is susceptible to vulnerabilities that can lead to excessive memory usage, particularly when handling specific PDF structures.

Vulnerability Detail

The vulnerability arises from the handling of the '/ToUnicode' entry in PDF fonts, which can be exploited by an attacker to create a PDF file that consumes an excessive amount of memory during parsing. This can lead to denial of service conditions, where legitimate users may experience degraded performance or complete application failure. The issue is particularly critical when extracting text from PDFs with unusually large '/ToUnicode' streams.

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.18.1

This is the first release that contains the fix.

pip install --upgrade "pypdf==6.18.1"

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

Workaround

If you are unable to upgrade immediately, you can apply the changes from pull request #4071 on GitHub. This involves modifying the handling of the '/ToUnicode' entry to mitigate memory consumption issues. For detailed instructions, refer to the PR documentation on GitHub.

Conclusion

In summary, the CVE-2026-102995 vulnerability in the pypdf library can lead to significant memory consumption when processing certain PDF files. It is crucial to update to the patched version 6.18.1 or apply the recommended workarounds to mitigate the risks associated with this vulnerability.

See every vulnerability recorded for pypdf →

Share this vulnerability

FAQ

The CVSS score for this vulnerability is 8.7, indicating a high severity level.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The primary impact is excessive memory consumption, which can lead to application crashes or denial of service for users trying to access affected PDF files.

Yes, you should upgrade to pypdf version 6.18.1 or later to ensure that the vulnerability is patched.

If an immediate upgrade is not possible, consider applying the changes from pull request #4071 as a temporary workaround.

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.18.1

This is the first release that contains the fix.

pip install --upgrade "pypdf==6.18.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