CVE-2022-24859

NameCVE-2022-24859
DescriptionPyPDF2 is an open source python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. In versions prior to 1.27.5 an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop if the PyPDF2 if the code attempts to get the content stream. The reason is that the last while-loop in `ContentStream._readInlineImage` only terminates when it finds the `EI` token, but never actually checks if the stream has already ended. This issue has been resolved in version `1.27.5`. Users unable to upgrade should validate and PDFs prior to iterating over their content stream.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub advisories/code/issues, web search, more)
ReferencesDLA-3039-1
Debian Bugs1009879

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
pypdf2 (PTS)buster1.26.0-2vulnerable
bullseye1.26.0-4vulnerable
bookworm, sid2.10.9-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
pypdf2sourcestretch1.26.0-2+deb9u1DLA-3039-1
pypdf2source(unstable)1.27.9-11009879

Notes

[bullseye] - pypdf2 <no-dsa> (Minor issue)
[buster] - pypdf2 <no-dsa> (Minor issue)
https://github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79
https://github.com/py-pdf/PyPDF2/issues/329
https://github.com/py-pdf/PyPDF2/pull/740

Search for package or bug name: Reporting problems