CVE-2023-36807 json
Infinite Loop when reading malformed objects in pypdf
published 3y ago modified 13d ago also EUVD-2023-1823 , GHSA-hm9v-vj3r-r55m , PYSEC-2026-1836
- cvss
- 6.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 47%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi pypdf2 2.10.6
- pypdf2 Debian 12 2.10.7-1
debian advisories DEBIAN-CVE-2023-36807
- github.com/py-pdf/pypdf@e6531a2 commit
- github.com/py-pdf/pypdf#1331 pull request
- github.com/py-pdf/pypdf/security/advisories/GHSA-hm9v-vj3r-r55m advisory
Is CVE-2023-36807 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2y ago
Exploit prediction
0.57% chance of exploitation in the next 30 days, higher than 47% of all scored CVEs (FIRST EPSS, 2026-11-15).
Exploits and checks
- github.com https://github.com/py-pdf/pypdf/security/advisories/GHSA-hm9v-vj3r-r55m referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/py-pdf/pypdf/issues/1329 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| OSV | 3.1 | 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pypdf2 | >=2.10.5, <2.10.6 |
2.10.6 |
Affected products
- py-pdf pypdf
- pypdf_project pypdf
Classification
- Weakness
-
- CWE-835 Loop with Unreachable Exit Condition
References
-
github.com
/py-pdf/pypdf/pull/1331
web, patch
-
github.com
/py-pdf/pypdf/security/advisories/GHSA-hm9v-vj3r-r55m
web, exploit, mitigation, patch, vendor-advisory, advisory
-
github.com
/py-pdf/pypdf/commit/e6531a25325e7e0174b6a1ba03b57320b5227f6b
web, patch
-
github.com
/py-pdf/pypdf/issues/1329
web, exploit, issue-tracking, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2023-36807
advisory
-
github.com
/py-pdf/pypdf
package
-
pypi.org
/project/pypdf2
package
-
github.com
/advisories/GHSA-hm9v-vj3r-r55m
advisory
Sources
- CVE List CVE-2023-36807
- GitHub Advisory GHSA-hm9v-vj3r-r55m
- NVD CVE-2023-36807
- OSV PYSEC-2026-1836
- Maintainer advisory GHSA-hm9v-vj3r-r55m
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
The maintainers of py-pdf/pypdf published their own advisory on GitHub. Reviewed sources take precedence over it.