All reports
Medium

pypdf possibly loops infinitely when reading DCT inline images without EOF marker

Affected versions

Version ranges need review.

PyPIpypdf
Affected versions
<6.1.3
Fixed version
6.1.3
PyPIpypdf
Affected versions
< 6.1.3
Fixed version
6.1.3
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2025-62707

Probability of exploitation in the next 30 days: 0.44%

FIRST EPSS · 2026-11-21

Description

Impact

An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires parsing the content stream of a page which has an inline image using the DCTDecode filter.

Patches

This has been fixed in pypdf==6.1.3.

Workarounds

If you cannot upgrade yet, consider applying the changes from PR #3501.

Links

Credits

  • tylzh97
  • stefan6419846