# CVE-2023-36807: Infinite Loop when reading malformed objects in pypdf

- Severity: Medium 6.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/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.57%, higher than 48% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2023-06-30T18:38:10.303Z
- Modified: 2026-11-02T16:06:04.477Z
- Also known as: GHSA-hm9v-vj3r-r55m, PYSEC-2026-1836
- Weaknesses: CWE-835
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. In version 2.10.5 an attacker who uses this vulnerability 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 if the user extracted metadata from such a malformed PDF. Versions prior to 2.10.5 throw an error, but do not hang forever. This issue was fixed with https://github.com/py-pdf/pypdf/pull/1331 which has been included in release 2.10.6. Users are advised to upgrade. Users unable to upgrade should modify `PyPDF2/generic/_data_structures.py::read_object` to an an error throwing case. See GHSA-hm9v-vj3r-r55m for details.

(As written by CVE List.)

## Affected

- py-pdf pypdf: 2.10.5
- pypdf_project pypdf: 2.10.5
- pypdf2 (PyPI): from 2.10.5 before 2.10.6

## Every score

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

## References

- <https://github.com/py-pdf/pypdf/security/advisories/GHSA-hm9v-vj3r-r55m> (exploit, mitigation, patch, vendor-advisory, web)
- <https://github.com/py-pdf/pypdf/issues/1329> (exploit, issue-tracking, vendor-advisory, web)
- <https://github.com/py-pdf/pypdf/pull/1331> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-36807> (advisory)
- <https://github.com/py-pdf/pypdf/commit/e6531a25325e7e0174b6a1ba03b57320b5227f6b> (fix, web)
- <https://github.com/py-pdf/pypdf> (package)
- <https://pypi.org/project/pypdf2> (package)
- <https://github.com/advisories/GHSA-hm9v-vj3r-r55m> (advisory)

## Sources

- CVE List: [CVE-2023-36807](https://www.cve.org/CVERecord?id=CVE-2023-36807), CVE Terms of Use, modified 2024-11-06
- GitHub Advisory Database: [GHSA-hm9v-vj3r-r55m](https://github.com/advisories/GHSA-hm9v-vj3r-r55m), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2023-36807](https://nvd.nist.gov/vuln/detail/CVE-2023-36807), Public domain, modified 2026-11-02
- PyPA Advisory Database: [PYSEC-2026-1836](https://osv.dev/vulnerability/PYSEC-2026-1836), CC-BY-4.0, modified 2026-07-07

---

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