{"cve":"CVE-2022-24859","nvd":{"published":"2022-04-18T19:15:09.757","modified":"2026-06-17T04:32:40.613","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5},"cwes":["CWE-835"],"references":["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://github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79","https://lists.debian.org/debian-lts-announce/2022/06/msg00001.html"],"products":["debian:debian_linux","pypdf2_project:pypdf2"],"source":"nvd","synced_at":"2026-10-19T21:30:03.577988018+00:00"},"epss":{"cve":"CVE-2022-24859","score":0.01328,"percentile":0.71014,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-xcjx-m2pj-8g79","url":"https://osv.dev/vulnerability/GHSA-xcjx-m2pj-8g79","summary":"Manipulated inline images can cause Infinite Loop in PyPDF2","modified":"2024-10-14T18:55:47.089530Z","packages":[{"ecosystem":"PyPI","name":"pypdf2","purl":"pkg:pypi/pypdf2","ranges":["<1.27.5"],"fixed":["1.27.5"]}]},{"id":"PYSEC-2022-194","url":"https://osv.dev/vulnerability/PYSEC-2022-194","summary":"","modified":"2023-11-08T04:08:38.867416Z","packages":[{"ecosystem":"PyPI","name":"pypdf2","purl":"pkg:pypi/pypdf2","ranges":["<1.27.5"],"fixed":["1.27.5"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}