# CVE-2023-46250: pypdf possible Infinite Loop when PdfWriter(clone_from) is used with a PDF

- Severity: Medium 5.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Published: 2023-10-31T15:23:32.852Z
- Modified: 2026-11-02T16:06:04.477Z
- Also known as: GHSA-wjcc-cq79-p63f, PYSEC-2026-1834
- Weaknesses: CWE-835
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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`.

(As written by CVE List.)

## Affected

- py-pdf pypdf: >= 3.7.0, < 3.17.0; from 3.7.0 before 3.17.0
- pypdf (PyPI): from 3.7.0 before 3.17.0

## Every score

- GitHub_M: CVSS:3.1 5.1 Medium `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 5.1 Medium `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.1 5.1 Medium `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/py-pdf/pypdf/security/advisories/GHSA-wjcc-cq79-p63f> (vendor-advisory, web)
- <https://github.com/py-pdf/pypdf/pull/2264> (issue-tracking, patch, web)
- <https://github.com/py-pdf/pypdf/commit/9b23ac3c9619492570011d551d521690de9a3e2d> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-46250> (advisory)
- <https://github.com/py-pdf/pypdf> (package)
- <https://pypi.org/project/pypdf> (package)
- <https://github.com/advisories/GHSA-wjcc-cq79-p63f> (advisory)

## Sources

- CVE List: [CVE-2023-46250](https://www.cve.org/CVERecord?id=CVE-2023-46250), CVE Terms of Use, modified 2024-09-05
- GitHub Advisory Database: [GHSA-wjcc-cq79-p63f](https://github.com/advisories/GHSA-wjcc-cq79-p63f), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2023-46250](https://nvd.nist.gov/vuln/detail/CVE-2023-46250), Public domain, modified 2026-11-02
- PyPA Advisory Database: [PYSEC-2026-1834](https://osv.dev/vulnerability/PYSEC-2026-1834), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2023-46250 · Whole record: https://cve.day/CVE-2023-46250.json · Rebuilt by cve.day 2026-11-25T22:58:29.869Z
