CVE-2026-84311
JSON

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 packageVersionsReported by
py-pdf pypdf< 6.16.1, before 6.16.1CVE List, NVD
pypdf (PyPI)before 6.16.1GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M4.8medium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
NVD3.3low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS: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

CWE-834

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

SourceRecordLicence
CVE ListCVE-2026-84311 changed 2026-09-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-763m-79hh-57f2 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-84311 changed 2026-11-02Public domain
PyPA Advisory DatabasePYSEC-2026-3911 changed 2026-09-10CC-BY-4.0