Vulnerability in Py-Pdf Pypdf2
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.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 6.2 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
EPSS exploit prediction
EPSS: 0.013 (69.5th percentile), scored .
Low probability of exploitation in the next 30 days, but still tracked. 70th percentile — 69.5% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.013 · newest: 0.013 · change: 0.000
Affected products
- Py-Pdf Pypdf2 — versions < 1.27.5
- Pypdf2 Project
- Debian Linux — versions 9.0
Weakness classification (CWE)
References
- github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79 (Exploit, Third Party Advisory)
- github.com/py-pdf/PyPDF2/issues/329 (Exploit, Third Party Advisory)
- github.com/py-pdf/PyPDF2/pull/740 (Patch, Third Party Advisory)
- github.com/py-pdf/PyPDF2/releases/tag/1.27.5 (Third Party Advisory, Release Notes)
- lists.debian.org/debian-lts-announce/2022/06/msg00001.html (mailing-list, Mailing List, Third Party Advisory)
- lists.debian.org/debian-lts-announce/2023/06/msg00013.html (mailing-list)
Frequently asked questions
- What is CVE-2022-24859?
- CVE-2022-24859 is a medium-severity vulnerability in Py-Pdf Pypdf2, classified under Loop with Unreachable Exit Condition (Infinite Loop). CVSS score: 6.2/10. Published 2022-04-18.
- How severe is CVE-2022-24859?
- Medium severity. CVSS v3 base score is 6.2 out of 10.