6.0medium
pypdf: Possible infinite loop when hitting EOF in standard xref table
- Severity
- 6.0medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.35% (higher than 31% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-39mj-jf6j-2qj3
Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.20.0, an attacker can craft an incomplete PDF that ends inside a standard cross-reference table, causing pypdf to mishandle the unexpected end of file and enter an infinite loop. This issue is fixed in version 6.20.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| py-pdf pypdf | < 6.20.0, before 6.20.0 | CVE List, NVD |
| pypdf (PyPI) | before 6.20.0 | GitHub Advisory Database |
All scores
| GitHub_M | 6.0medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
pypdf is a free and open-source pure-python PDF library. Prior to 6.20.0, an attacker can craft an incomplete PDF that ends inside a standard cross-reference table, causing pypdf to mishandle the unexpected end of file and enter an infinite loop. This issue is fixed in version 6.20.0.
GitHub Advisory Database
Impact
An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires an incomplete file which ends inside the xref table.
Patches
This has been fixed in pypdf==6.20.0.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #4170.
Notes
This has been reported through both the secure channel and as a public issue at #4169.
References
| https://github.com/py-pdf/pypdf/security/advisories/GHSA-39mj-jf6j-2qj3 | vendor-advisory, web | |
| https://github.com/py-pdf/pypdf/issues/4169 | issue-tracking, patch, web | |
| https://github.com/py-pdf/pypdf/pull/4170 | issue-tracking, patch, web | |
| https://github.com/py-pdf/pypdf/commit/37e1cd681744bac38b159f7e1c614eee8d639c58 | patch, web | |
| https://github.com/py-pdf/pypdf/releases/tag/6.20.0 | release-notes, web | |
| https://github.com/py-pdf/pypdf | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-113794 changed 2026-10-28 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-39mj-jf6j-2qj3 changed 2026-10-21 | CC-BY-4.0 |
| NVD | CVE-2026-113794 changed 2026-11-02 | Public domain |