{"id":"CVE-2023-46250","published":"2023-10-31T15:23:32Z","modified":"2024-09-05T18:54:52Z","title":"pypdf possible Infinite Loop when PdfWriter(clone_from) is used with a PDF","vendor":"py-pdf","product":"pypdf","tier":"tail","description":{"text":"pypdf is a free and open-source pure-python PDF library. An attacker who uses a vulnerability present in versions 3.7.0 through 3.16.4 can craft a PDF which leads to an infinite loop. This infinite loop blocks the current process and can utilize a single core of the CPU by 100%. It does not affect memory usage. That is, for example, the case when the pypdf-user manipulates an incoming malicious PDF e.g. by merging it with another PDF or by adding annotations. The issue was fixed in version 3.17.0. As a workaround, apply the patch manually by modifying `pypdf/generic/_data_structures.py`.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00254,"percentile":0.1732,"provenance":"source"},"cwes":[{"id":"CWE-835","name":"Loop with Unreachable Exit Condition"}],"references":[{"url":"https://github.com/py-pdf/pypdf/security/advisories/GHSA-wjcc-cq79-p63f","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/py-pdf/pypdf/pull/2264","tags":["x_refsource_MISC"]},{"url":"https://github.com/py-pdf/pypdf/commit/9b23ac3c9619492570011d551d521690de9a3e2d","tags":["x_refsource_MISC"]}],"priority":{"score":7.0,"factors":[{"name":"EPSS percentile","points":3.46},{"name":"CVSS severity","points":3.57}]},"vendorSlug":"py-pdf","affectedVersions":[{"vendor":"py-pdf","product":"pypdf","versions":[">= 3.7.0, < 3.17.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-05T18:52:16.129180Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pypdf","vulnerableRanges":[">=3.7.0, <3.17.0"],"patched":["3.17.0"],"from":["GHSA-wjcc-cq79-p63f","PYSEC-2026-1834"],"provenance":"source"}],"summary":{"text":"The pypdf library (py-pdf/pypdf) contains a flaw in its handling of PDF structures, where a specially crafted PDF can trigger an infinite loop when processed, for example when PdfWriter(clone_from) is used. An attacker can exploit this by supplying a malicious PDF that the pypdf user then processes locally, such as by merging it with another PDF or adding annotations, which blocks the process and pins one CPU core at 100%, with no effect on memory usage.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:16:45Z"},"euvd":{"id":"EUVD-2023-2830","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-py-pdf-pypdf-cve-2023-46250","children":[{"from":"CVE-2023-46250","to":"CVE-2026-113790","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["pypdf/generic/_data_structures.py"],"commits":["https://github.com/py-pdf/pypdf/commit/9b23ac3c9619492570011d551d521690de9a3e2d","https://github.com/py-pdf/pypdf/commit/18bd2981a74479483a0b9507602c58a63d6c9b12"],"basis":"shared function","functions":["_clone"]}]},{"from":"CVE-2023-46250","to":"CVE-2026-113791","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["pypdf/generic/_data_structures.py"],"commits":["https://github.com/py-pdf/pypdf/commit/9b23ac3c9619492570011d551d521690de9a3e2d","https://github.com/py-pdf/pypdf/commit/18bd2981a74479483a0b9507602c58a63d6c9b12"],"basis":"shared function","functions":["_clone"]}]}],"packageHistory":[{"cve":"CVE-2023-36464","published":"2023-06-27","fixed":"3.9.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-2023-46250","published":"2023-10-31","fixed":"3.17.0","kev":false},{"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},{"cve":"CVE-2025-62708","published":"2025-10-22","fixed":"6.1.3","kev":false}],"package":"PyPI:pypdf"}}