{"id":"CVE-2023-36464","published":"2023-06-27T21:24:30Z","modified":"2024-12-03T16:56:06Z","title":"Infinite Loop when a comment isn't followed by a character in pypdf","vendor":"py-pdf","product":"pypdf","tier":"tail","description":{"text":"pypdf is an open source, pure-python PDF library. In affected versions an attacker may craft a PDF which leads to an infinite loop if `__parse_content_stream` is executed. That is, for example, the case if the user extracted text from such a PDF. This issue was introduced in pull request #969 and resolved in pull request #1828. Users are advised to upgrade. Users unable to upgrade may modify the line `while peek not in (b\"\\r\", b\"\\n\")` in `pypdf/generic/_data_structures.py` to `while peek not in (b\"\\r\", b\"\\n\", b\"\")`.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.2,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00345,"percentile":0.20434,"provenance":"source"},"cwes":[{"id":"CWE-835","name":"Loop with Unreachable Exit Condition"}],"references":[{"url":"https://github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/py-pdf/pypdf/pull/1828","tags":["x_refsource_MISC"]},{"url":"https://github.com/py-pdf/pypdf/pull/969","tags":["x_refsource_MISC"]}],"priority":{"score":8.4,"factors":[{"name":"EPSS percentile","points":4.09},{"name":"CVSS severity","points":4.34}]},"vendorSlug":"py-pdf","affectedVersions":[{"vendor":"py-pdf","product":"pypdf","versions":["pypdf: < 3.90","PyPDF2: >= 2.2.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-12-03T16:55:56.361143Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pypdf","vulnerableRanges":[">=3.1.0, <3.9.0"],"patched":["3.9.0"],"from":["GHSA-4vvm-4w3v-6mr8","PYSEC-2026-3008"],"provenance":"source"},{"ecosystem":"PyPI","package":"PyPDF2","vulnerableRanges":[">=2.2.0, <=3.0.1",">=2.2.0, <3.9.0"],"patched":["3.9.0"],"from":["GHSA-4vvm-4w3v-6mr8","PYSEC-2026-1835"],"provenance":"source"}],"euvd":{"id":"EUVD-2023-1690","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2023-36464","published":"2023-06-27","fixed":"3.9.0","kev":false},{"cve":"CVE-2023-46250","published":"2023-10-31","fixed":"3.17.0","kev":false,"link":{"from":"CVE-2023-36464","to":"CVE-2023-46250","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:pypdf","fromFixed":"3.9.0","toFixed":"3.17.0","daysApart":126},{"kind":"same-code","provenance":"machine","files":["pypdf/generic/_data_structures.py"],"commits":["https://github.com/py-pdf/pypdf/commit/b0e5c689df689ab173df84dacd77b6fc3c161932","https://github.com/py-pdf/pypdf/commit/9b23ac3c9619492570011d551d521690de9a3e2d"],"basis":"shared file"}]}},{"cve":"CVE-2025-55197","published":"2025-08-13","fixed":"6.0.0","kev":false},{"cve":"CVE-2025-62707","published":"2025-10-22","fixed":"6.1.3","kev":false}],"package":"PyPI:pypdf"}}