ADVISORIES

PyPA Advisory Database

PYSEC-2026-1837

PyPDF2 quadratic runtime with malformed PDF missing xref marker

Details

Impact

An attacker who uses this vulnerability can craft a PDF which leads to unexpected long runtime. This quadratic runtime blocks the current process and can utilize a single core of the CPU by 100%. It does not affect memory usage.

Patches

https://github.com/py-pdf/pypdf/pull/808

Workarounds

_Is there a way for users to fix or remediate the vulnerability without upgrading?_

References

Affected packages

EcosystemPackageAffected versions
PyPIpypdf2
All versions before 1.27.9 (fixed in 1.27.9)

References