CVE-2022-24859: PyPDF2 is an open source python PDF library capable of splitting, merging, cropping, and transforming the page
CVE-2022-24859 is a medium-severity flaw (CVSS 6.2) affecting pypdf2, debian linux. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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
Why this priority
- Public exploit reference
- On your watchlist
A fixed release or distro patch exists.
Risk facts
| CVSS score | 6.2 (Medium) |
| Attack vector | Local |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 1.3% (top 29%) |
| CISA exploited list | No |
| Weakness | CWE-835 |
| Published | 2022-04-18 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2022-24859?
pypdf2: upgrade to 1.27.5; debian linux: mitigate or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2022-24859 being exploited?
CVE-2022-24859 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2022-24859 affect?
CVE-2022-24859 affects pypdf2, debian linux. Severity is medium (CVSS 6.2). 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 loo
How urgent is CVE-2022-24859?
Priority 49/100. Public exploit reference; On your watchlist
Software pages
Python vulnerabilities · Debian vulnerabilities
Related CVEs
- CVE-2023-36464 MEDIUM 6.2 UPGRADE DOWNGRADE pypdf is an open source, pure-python PDF library