CVE-2022-24859
PyPDF2 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.
EPSS 0.13% · 31.5th percentile
Risk Scores
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| debian | debian_linux | 9.0 |
| pypdf2_project | pypdf2 | 0 |
| PyPI | PyPDF2 | 0 |
| py-pdf | PyPDF2 | < 1.27.5 |
Exploit Intelligence
- https://github.com/py-pdf/PyPDF2/issues/329 (nist-nvd)
- https://github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79 (nist-nvd)
- https://github.com/py-pdf/PyPDF2/pull/740 (circl)
- https://github.com/py-pdf/PyPDF2/releases/tag/1.27.5 (circl)
- [debian-lts-announce] 20220603 [SECURITY] [DLA 3039-1] pypdf2 security update (circl)
- [debian-lts-announce] 20230609 [SECURITY] [DLA 3451-1] pypdf2 security update (circl)
Timeline
- Apr 18, 2022 CVE Published
- Apr 19, 2022 EPSS Score
- Jun 8, 2022 EPSS Score
- Jul 29, 2022 EPSS Score
- Sep 17, 2022 EPSS Score
- Nov 6, 2022 EPSS Score
- Dec 26, 2022 EPSS Score
- Feb 14, 2023 EPSS Score
- Mar 7, 2023 EPSS Score
- Apr 5, 2023 EPSS Score
- May 25, 2023 EPSS Score
- Jul 14, 2023 EPSS Score
References
- https://github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79 url
- https://github.com/py-pdf/PyPDF2/issues/329 url
- https://github.com/py-pdf/PyPDF2/pull/740 url
- https://github.com/py-pdf/PyPDF2/releases/tag/1.27.5 url
- [debian-lts-announce] 20220603 [SECURITY] [DLA 3039-1] pypdf2 security update mailing-list
- [debian-lts-announce] 20230609 [SECURITY] [DLA 3451-1] pypdf2 security update mailing-list
- https://nvd.nist.gov/vuln/detail/CVE-2022-24859 advisory
- https://github.com/py-pdf/PyPDF2 package
- https://github.com/pypa/advisory-database/tree/main/vulns/pypdf2/PYSEC-2022-194.yaml url