NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · PyPI

CVE-2025-66019: pypdf's LZWDecode streams be manipulated to exhaust RAM

mediumCVSS 4.0 6.6GHSA-m449-cwjh-6pw7

Impact An attacker who uses this vulnerability can craft a PDF which leads to a memory usage of up to 1 GB per stream. This requires parsing the content stream of a page using the LZWDecode filter. This is a follow up to GHSA-jfx9-29x2-rv3j to align the default limit with the one for zlib. Patches This has been fixed in pypdf==6.4.0.

Published Nov 24, 2025 · Updated Jan 21, 2026

Affected packages

pypdf

Ecosystem
PyPI
Affected
< 6.4.0
Fixed in
6.4.0
Check
pip show pypdf

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Impact

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

This is a follow up to GHSA-jfx9-29x2-rv3j to align the default limit with the one for *zlib*.

Patches

This has been fixed in pypdf==6.4.0.

Workarounds

If users cannot upgrade yet, use the line below to overwrite the default in their code:

pypdf.filters.LZW_MAX_OUTPUT_LENGTH = 75_000_000

Credited to aydinnyunus, stefan6419846.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More PyPI vulnerabilities

All PyPI entries