Advisory

PYSEC-2026-1830

Also known as: CVE-2025-55197, GHSA-7hfw-26vp-jp8m

Summary

PyPDF's Manipulated FlateDecode streams can exhaust RAM

Details

Impact
An attacker who uses this vulnerability can craft a PDF which leads to the RAM being exhausted. This requires just reading the file if a series of FlateDecode filters is used on a malicious cross-reference stream. Other content streams are affected on explicit access.

Patches
This has been fixed in pypdf==6.0.0.

Workarounds
If you cannot upgrade yet, you might want to implement the workaround for pypdf.filters.decompress yourself: https://github.com/py-pdf/pypdf/blob/0dd57738bbdcdb63f0fb43d8a6b3d222b6946595/pypdf/filters.py#L72-L143

References
This issue has been reported in #3429 and fixed in #3430.

Severity

Not rated by the source.

Dates

Published
2026-07-07 16:03 UTC
Modified
2026-07-07 17:46 UTC

Affected packages and fixes

pypdf

PyPI · All systems

Affected

  • introduced 0, fixed 6.0.0 (ecosystem)

Fixed versions

6.0.0

Fix

  • Fixed version 6.0.0
    pip install --upgrade pypdf==6.0.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: PyPA Advisory Database · CC BY 4.0

Sources & licences