CVE-2022-24859
Manipulated inline images can cause Infinite Loop in PyPDF2
Description
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.
INFO
Published Date :
April 18, 2022, 7:15 p.m.
Last Modified :
Nov. 21, 2024, 6:51 a.m.
Remotely Exploit :
No
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source | 
|---|---|---|---|---|---|---|
| CVSS 2.0 | MEDIUM | [email protected] | ||||
| CVSS 3.1 | MEDIUM | [email protected] | ||||
| CVSS 3.1 | MEDIUM | [email protected] | 
Solution
- Upgrade the python-pypdf2 packages.
- Update the affected python-pypdf2 and/or python3-pypdf2 packages.
References to Advisories, Solutions, and Tools
                                            Here, you will find a curated list of external links that provide in-depth
                                            information, practical solutions, and valuable tools related to
                                            CVE-2022-24859.
                                        
CWE - Common Weakness Enumeration
            While CVE identifies
            specific instances of vulnerabilities, CWE categorizes the common flaws or
            weaknesses that can lead to vulnerabilities. CVE-2022-24859 is
            associated with the following CWEs:
        
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
            (CAPEC)
            stores attack patterns, which are descriptions of the common attributes and
            approaches employed by adversaries to exploit the CVE-2022-24859
            weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
			The following list is the news that have been mention
			CVE-2022-24859 vulnerability anywhere in the article.
		
                The following table lists the changes that have been made to the
                CVE-2022-24859 vulnerability over time.
            
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
- 
                            CVE Modified by af854a3a-2127-422b-91ae-364da2661108Nov. 21, 2024 Action Type Old Value New Value Added Reference https://github.com/py-pdf/PyPDF2/issues/329 Added Reference https://github.com/py-pdf/PyPDF2/pull/740 Added Reference https://github.com/py-pdf/PyPDF2/releases/tag/1.27.5 Added Reference https://github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79 Added Reference https://lists.debian.org/debian-lts-announce/2022/06/msg00001.html Added Reference https://lists.debian.org/debian-lts-announce/2023/06/msg00013.html 
- 
                            CVE Modified by [email protected]May. 14, 2024 Action Type Old Value New Value 
- 
                            CVE Modified by [email protected]Jun. 10, 2023 Action Type Old Value New Value Added Reference https://lists.debian.org/debian-lts-announce/2023/06/msg00013.html [No Types Assigned] 
- 
                            Modified Analysis by [email protected]Jun. 15, 2022 Action Type Old Value New Value Changed Reference Type https://lists.debian.org/debian-lts-announce/2022/06/msg00001.html No Types Assigned https://lists.debian.org/debian-lts-announce/2022/06/msg00001.html Mailing List, Third Party Advisory Added CPE Configuration OR *cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* 
- 
                            CVE Modified by [email protected]Jun. 03, 2022 Action Type Old Value New Value Added Reference https://lists.debian.org/debian-lts-announce/2022/06/msg00001.html [No Types Assigned] 
- 
                            Initial Analysis by [email protected]Apr. 27, 2022 Action Type Old Value New Value Added CVSS V2 Metadata Victim must voluntarily interact with attack mechanism Added CVSS V2 NIST (AV:N/AC:M/Au:N/C:N/I:N/A:P) Added CVSS V3.1 NIST AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H Changed Reference Type https://github.com/py-pdf/PyPDF2/issues/329 No Types Assigned https://github.com/py-pdf/PyPDF2/issues/329 Exploit, Third Party Advisory Changed Reference Type https://github.com/py-pdf/PyPDF2/pull/740 No Types Assigned https://github.com/py-pdf/PyPDF2/pull/740 Patch, Third Party Advisory Changed Reference Type https://github.com/py-pdf/PyPDF2/releases/tag/1.27.5 No Types Assigned https://github.com/py-pdf/PyPDF2/releases/tag/1.27.5 Release Notes, Third Party Advisory Changed Reference Type https://github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79 No Types Assigned https://github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79 Exploit, Third Party Advisory Added CWE NIST CWE-835 Added CPE Configuration OR *cpe:2.3:a:pypdf2_project:pypdf2:*:*:*:*:*:*:*:* versions up to (excluding) 1.27.5 
Vulnerability Scoring Details
Base CVSS Score: 6.2
Base CVSS Score: 4.3
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
0.17 }} 0.01%
score
0.38210
percentile
 
                         
                         
                         
                                             
                                            