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

Medium 6.6 Published Updated

Attackers can cause excessive memory consumption and potential service disruption by crafting malicious PDFs with LZWDecode streams in pypdf.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-66019?

CVE-2025-66019 is a medium-severity denial of service vulnerability in py-pdf pypdf, published on 25 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-409, CWE-400

Which versions are affected by CVE-2025-66019?

3 open source packages ship an affected version, including pypdf.

PackageAffectedFixed in
pypdf PyPIAll versions6.4.0
pypdf PyPIAll versions6.4.0
pypdf PyPIAll versions6.4.0
Linux distribution packages (1)
python-pypdf openSUSE:TumbleweedAll versions6.4.0-1.1

How do I fix CVE-2025-66019?

Upgrade pypdf to 6.4.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-66019 being exploited?

There is no known exploitation of CVE-2025-66019 in the wild and no public exploit code.

Sources

Also known as GHSA-m449-cwjh-6pw7, PYSEC-2026-1832, UBUNTU-CVE-2025-66019, openSUSE-SU-2025:15776-1.

Is CVE-2025-66019 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free