{"id":"CVE-2025-66019","aliases":["GHSA-m449-cwjh-6pw7","PYSEC-2026-1832"],"title":"pypdf's LZWDecode streams be manipulated to exhaust RAM","summary":"pypdf's LZWDecode streams be manipulated to exhaust RAM","severity":"medium","vendor":"pypdf","product":"pypdf","ecosystem":"pip","affected":["pypdf < 6.4.0"],"patched":["pypdf 6.4.0"],"published":"2025-11-24","updated":"2026-09-10","sourceUpdated":"2026-09-10T03:50:31.107367078Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-m449-cwjh-6pw7","references":[{"url":"https://github.com/py-pdf/pypdf/security/advisories/GHSA-jfx9-29x2-rv3j"},{"url":"https://github.com/py-pdf/pypdf/security/advisories/GHSA-m449-cwjh-6pw7"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66019"},{"url":"https://github.com/py-pdf/pypdf/commit/96186725e5e6f237129a58a97cd19204a9ce40b2"},{"url":"https://aydinnyunus.github.io/2025/12/20/cve-2025-66019-pypdf-lzw-dos"},{"url":"https://github.com/py-pdf/pypdf"},{"url":"https://github.com/py-pdf/pypdf/releases/tag/6.4.0"}],"tags":["osv","pip"],"epss":0.00361,"epssPercentile":0.29829,"ingestedAt":"2026-07-08T18:25:51.119Z","slug":"CVE-2025-66019","body":"## Overview\n\n### Impact\n\nAn 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.\n\nThis is a follow up to [GHSA-jfx9-29x2-rv3j](https://github.com/py-pdf/pypdf/security/advisories/GHSA-jfx9-29x2-rv3j) to align the default limit with the one for *zlib*.\n\n### Patches\nThis has been fixed in [pypdf==6.4.0](https://github.com/py-pdf/pypdf/releases/tag/6.4.0).\n\n### Workarounds\nIf users cannot upgrade yet, use the line below to overwrite the default in their code:\n\n```python\npypdf.filters.LZW_MAX_OUTPUT_LENGTH = 75_000_000\n```\n\n## Affected packages\n\n- `pypdf < 6.4.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `pypdf 6.4.0`","depth":"sunlit","depthScore":28,"depthScoreParts":{"impact":27.5,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}