---
cve: "CVE-2022-24859"
severity: "MEDIUM"
cvss: 6.2
epss: "1.3%"
vendor: "py-pdf"
kev: false
exploited: false
published: "2022-04-18 19:15:09"
tags: [cve, security, medium]
source: tsecurity.de CVE-Dossier
exported: "2026-09-11T09:32:36+02:00"
---

# CVE-2022-24859

> 6.2 MEDIUM · 🧪 PoC

## Beschreibung

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.

## CVSS-Vektor

```
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
```

| Metrik | Wert | Bewertung |
|---|---|---|
| AV Angriffsvektor | Lokal | good |
| AC Komplexität | Gering | bad |
| PR Privilegien | Keine | bad |
| UI Interaktion | Keine | bad |
| S Scope | Unverändert | good |
| C Vertraulichkeit | Keine | good |
| I Integrität | Keine | good |
| A Verfügbarkeit | Hoch | bad |

## Patch verfügbar (OSV)

- 733989af6fc0f87d69d78509f3766b47ffc24e1d (Commit)

## Referenzen

- <https://github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79>
- <https://github.com/py-pdf/PyPDF2/issues/329>
- <https://github.com/py-pdf/PyPDF2/pull/740>
- <https://github.com/py-pdf/PyPDF2/releases/tag/1.27.5>
- <https://lists.debian.org/debian-lts-announce/2022/06/msg00001.html>
- <https://lists.debian.org/debian-lts-announce/2023/06/msg00013.html>

---
_Exportiert aus dem [tsecurity.de CVE-Dossier](https://tsecurity.de/cve?cve=CVE-2022-24859) · Datenquellen: EUVD (ENISA), NVD, OSV, CISA KEV, FIRST EPSS, Exploit-DB, BSI BITS_
