CVE-2026-119207
JSON

7.1high

pypdf: Possible large memory usage for exceptions in strict mode

Severity
7.1high CVSS:4.0 by GitHub_M
Exploit likelihood
0.33% (higher than 28% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-4vqv-7265-gm2w

Description

pypdf is a free and open-source pure-python PDF library. Prior to 6.21.3, pypdf can consume excessive memory when strict mode loads a crafted invalid PDF dictionary. Nested parsing failures add repeated exception text to newly raised errors, allowing a small malformed dictionary to amplify into very large error messages. 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:N/UI:R/S:U/C:N/I:N/A:H

Classification

CWE-400CWE-405

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.21.3, pypdf can consume excessive memory when strict mode loads a crafted invalid PDF dictionary. Nested parsing failures add repeated exception text to newly raised errors, allowing a small malformed dictionary to amplify into very large error messages. 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 loading an invalid dictionary.

Patches

This has been fixed in pypdf==6.21.3.

Workarounds

If you cannot upgrade yet, consider applying the changes from PR #4265.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-119207 changed 2026-10-30CVE Terms of Use
GitHub Advisory DatabaseGHSA-4vqv-7265-gm2w changed 2026-10-30CC-BY-4.0
NVDCVE-2026-119207 changed 2026-11-02Public domain