7.1high
pypdf: Possible large memory usage when parsing cross-reference streams
- Severity
- 7.1high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.38% (higher than 34% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-x3rh-gjgm-fmqc
Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.21.3, pypdf can consume excessive memory while opening a crafted PDF containing cross-reference streams that declare very large entry counts. Highly compressible streams and /Prev chains can multiply the number of parsed entries across a document, while negative /Index counts can bypass the existing per-stream clamp. This issue is fixed in version 6.21.3.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| py-pdf pypdf | < 6.21.3, before 6.21.3 | CVE List, NVD |
| pypdf (PyPI) | before 6.21.3 | GitHub Advisory Database |
All scores
| GitHub_M | 7.1high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/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:L/UI:N/S:U/C:N/I:N/A:H |
Classification
What each source says
CVE List
pypdf is a free and open-source pure-python PDF library. Prior to 6.21.3, pypdf can consume excessive memory while opening a crafted PDF containing cross-reference streams that declare very large entry counts. Highly compressible streams and /Prev chains can multiply the number of parsed entries across a document, while negative /Index counts can bypass the existing per-stream clamp. This issue is fixed in version 6.21.3.
GitHub Advisory Database
Impact
An attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires opening a file with cross-reference streams.
Patches
This has been fixed in pypdf==6.21.3.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #4269.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-119209 changed 2026-10-30 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-x3rh-gjgm-fmqc changed 2026-10-30 | CC-BY-4.0 |
| NVD | CVE-2026-119209 changed 2026-11-02 | Public domain |