Skip to content

Manipulated LZWDecode streams can exhaust RAM

Moderate
stefan6419846 published GHSA-jfx9-29x2-rv3j Oct 22, 2025

Package

pip pypdf (pip)

Affected versions

< 6.1.3

Patched versions

>= 6.1.3

Description

Impact

An attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires parsing the content stream of a page using the LZWDecode filter.

Patches

This has been fixed in pypdf==6.1.3.

Workarounds

If you cannot upgrade yet, consider applying the changes from PR #3502.

Severity

Moderate

CVE ID

CVE-2025-62708

Weaknesses

Improper Handling of Highly Compressed Data (Data Amplification)

The product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output. Learn more on MITRE.

Credits