pypdf FlateDecode Stream Decompression Denial-of-Service Vulnerability

Vulnerability

A denial-of-service vulnerability has been identified in pypdf, a pure-Python PDF library, affecting versions prior to 6.7.1. The issue arises when an attacker crafts a PDF with a malformed FlateDecode stream, causing the library to use byte-by-byte decompression. This can lead to significantly prolonged processing times.

Impact

Exploitation of this vulnerability causes excessive runtimes when processing PDFs with malformed FlateDecode streams, due to the byte-by-byte decompression method employed.

Reproduction

The vulnerability can be reproduced by creating a PDF file that includes a malformed FlateDecode stream. When this PDF is processed with a version of pypdf prior to 6.7.1, the library will experience extended runtimes as it decompresses the data byte by byte.

Remediation

Users can upgrade to pypdf version 6.7.1 or later to address this vulnerability. If an immediate upgrade is not possible, the changes from PR #3644 can be applied as a temporary workaround.

Added: Feb 20, 2026, 10:22 PM
Updated: Feb 20, 2026, 10:22 PM

Vulnerability Rating

Custom Algorithm
spread
5.4
impact
0.6
exploitability
5.4
remediation
7.7
relevance
3.2
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.