// For flags

CVE-2022-24859

Manipulated inline images can cause Infinite Loop in PyPDF2

Severity Score

5.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

2
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

PyPDF2 es una librería PDF de código abierto capaz de dividir, fusionar, recortar y transformar las páginas de los archivos PDF. En versiones anteriores a 1.27.5 un atacante que use esta vulnerabilidad puede diseñar un PDF que conlleva a un bucle infinito si el código de PyPDF2 intenta conseguir el flujo de contenido. La razón es que el último bucle while en "ContentStream._readInlineImage" sólo termina cuando encuentra el token "EI", pero nunca comprueba si el flujo ya ha terminado. Este problema ha sido resuelto en versión "1.27.5". Los usuarios que no puedan actualizarse deberán comprobar y PDFs antes de iterar sobre su flujo de contenido

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Attack Vector
Network
Attack Complexity
Medium
Authentication
None
Confidentiality
None
Integrity
None
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-02-10 CVE Reserved
  • 2022-04-18 CVE Published
  • 2024-07-10 EPSS Updated
  • 2024-08-03 CVE Updated
  • 2024-08-03 First Exploit
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Pypdf2 Project
Search vendor "Pypdf2 Project"
Pypdf2
Search vendor "Pypdf2 Project" for product "Pypdf2"
< 1.27.5
Search vendor "Pypdf2 Project" for product "Pypdf2" and version " < 1.27.5"
-
Affected
Debian
Search vendor "Debian"
Debian Linux
Search vendor "Debian" for product "Debian Linux"
9.0
Search vendor "Debian" for product "Debian Linux" and version "9.0"
-
Affected