4.8medium
pypdf: Possible long runtimes/large memory usage when extracting XForm objects
- Severity
- 4.8medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.14% (higher than 3% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-763m-79hh-57f2PYSEC-2026-3911
Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.16.1, an attacker can craft a PDF that causes pypdf/_page.py PageObject._extract_text and PageObject.extract_xform_text to traverse a directed acyclic graph of reused form XObjects in which each form invokes a child multiple times, creating exponentially many traversal paths and causing long runtimes and large memory consumption. This issue is fixed in version 6.16.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| py-pdf pypdf | < 6.16.1, before 6.16.1 | CVE List, NVD |
| pypdf (PyPI) | before 6.16.1 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 4.8medium CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N |
| NVD | 3.3low CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L |
| PyPA Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N |
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.16.1, an attacker can craft a PDF that causes pypdf/_page.py PageObject._extract_text and PageObject.extract_xform_text to traverse a directed acyclic graph of reused form XObjects in which each form invokes a child multiple times, creating exponentially many traversal paths and causing long runtimes and large memory consumption. This issue is fixed in version 6.16.1.
GitHub Advisory Database
Impact
An attacker who uses this vulnerability can craft a PDF which leads to long runtimes and large memory consumption. This requires extracting the text of a page with lots of XForm objects, where some of them might be re-used.
Patches
This has been fixed in pypdf==6.16.1.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #3966.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-84311 changed 2026-09-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-763m-79hh-57f2 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-84311 changed 2026-11-02 | Public domain |
| PyPA Advisory Database | PYSEC-2026-3911 changed 2026-09-10 | CC-BY-4.0 |