Advisory

GHSA-m449-cwjh-6pw7

Also known as: CVE-2025-66019, PYSEC-2026-1832

Summary

pypdf's LZWDecode streams be manipulated to exhaust RAM

Details

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

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2025-11-24 22:42 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

pypdf

PyPI · All systems

Affected

  • introduced 0, fixed 6.4.0 (ecosystem)

Fixed versions

6.4.0

Fix

  • Fixed version 6.4.0
    pip install --upgrade pypdf==6.4.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences