CVE-2022-24859
Manipulated inline images can cause Infinite Loop in PyPDF2
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
2Exploited in Wild
-Decision
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
CVSS Scores
SSVC
- Decision:-
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
References (6)
URL | Tag | Source |
---|---|---|
https://github.com/py-pdf/PyPDF2/releases/tag/1.27.5 | Release Notes | |
https://lists.debian.org/debian-lts-announce/2022/06/msg00001.html | Mailing List | |
https://lists.debian.org/debian-lts-announce/2023/06/msg00013.html | Mailing List |
URL | Date | SRC |
---|---|---|
https://github.com/py-pdf/PyPDF2/issues/329 | 2024-08-03 | |
https://github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79 | 2024-08-03 |
URL | Date | SRC |
---|---|---|
https://github.com/py-pdf/PyPDF2/pull/740 | 2023-06-10 |
URL | Date | SRC |
---|
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
|