CVE-2025-55197
Python vulnerability analysis and mitigation

Overview

CVE-2025-55197 is a vulnerability in pypdf library versions prior to 6.0.0 that allows attackers to cause denial of service through RAM exhaustion. The vulnerability was discovered in August 2025 and involves manipulated FlateDecode streams in PDF files that can lead to uncontrolled resource consumption (GitHub Advisory).

Technical details

The vulnerability exists in the FlateDecode filter decompression functionality where nested FlateDecode filters can be used to create zip bombs. When processing such maliciously crafted PDF files, the library attempts to decompress the entire stream before parsing, which can lead to memory exhaustion. The issue is rated as Moderate severity and is classified as CWE-400 (Uncontrolled Resource Consumption) (GitHub Advisory).

Impact

An attacker can craft a PDF file that, when processed by the vulnerable versions of pypdf, leads to RAM exhaustion. This can occur simply by reading a malicious file containing a series of FlateDecode filters on a cross-reference stream. The proof-of-concept demonstrated that a small PDF file could unpack to over 1PB of zero bytes (GitHub Issue).

Mitigation and workarounds

The vulnerability has been fixed in pypdf version 6.0.0 by implementing a size limit for decompressed output. For users who cannot upgrade immediately, a workaround is available by implementing custom decompression limits in the pypdf.filters.decompress function. The recommended limit is set to 75,000,000 bytes, though this can be adjusted based on requirements (GitHub PR).

Community reactions

The vulnerability was responsibly disclosed through GitHub's security advisory system and was quickly addressed by the maintainers. The fix was included as part of the pypdf 6.0.0 release, which was announced with other security improvements (GitHub Release).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management