CVE-2026-119209
JSON

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

All scores

GitHub_M7.1high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-400CWE-770

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

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

SourceRecordLicence
CVE ListCVE-2026-119209 changed 2026-10-30CVE Terms of Use
GitHub Advisory DatabaseGHSA-x3rh-gjgm-fmqc changed 2026-10-30CC-BY-4.0
NVDCVE-2026-119209 changed 2026-11-02Public domain