CVE-2025-66019: pypdf's LZWDecode streams be manipulated to exhaust RAM
(updated )
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.
References
- aydinnyunus.github.io/2025/12/20/cve-2025-66019-pypdf-lzw-dos
- github.com/advisories/GHSA-m449-cwjh-6pw7
- github.com/py-pdf/pypdf
- github.com/py-pdf/pypdf/commit/96186725e5e6f237129a58a97cd19204a9ce40b2
- github.com/py-pdf/pypdf/releases/tag/6.4.0
- github.com/py-pdf/pypdf/security/advisories/GHSA-jfx9-29x2-rv3j
- github.com/py-pdf/pypdf/security/advisories/GHSA-m449-cwjh-6pw7
- nvd.nist.gov/vuln/detail/CVE-2025-66019
Code Behaviors & Features
Detect and mitigate CVE-2025-66019 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →