CVE-2026-119207

pypdf: Possible large memory usage for exceptions in strict mode

Published Oct 29, 2026 CVSS 4.0 · 7.1 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A crafted PDF containing an invalid dictionary can trigger nested parsing failures in the pypdf library when strict mode is enabled. Each failure appends its exception text to the next, creating exponentially larger error messages that rapidly consume memory. The consequence is a potential crash or significant slowdown of any process that loads such a PDF, representing an application‑level denial of service. The weakness is reflected in CWE-400, CWE-405, and CWE-770.

Affected Systems

All versions of py‑pdf pypdf released before 6.21.3 are affected. The fix is available starting with release 6.21.3, which removes the excessive memory usage bug.

Risk and Exploitability

The CVSS score of 7.1 indicates a moderate to high severity. No EPSS score is currently available and the vulnerability is not listed in CISA KEV, suggesting limited documented exploitation. The likely attack vector is that an application using pypdf in strict mode will receive a malicious PDF from an external source; the crafted PDF triggers the nested failure chain, inflating memory usage and potentially causing the process to crash. Because the exploit requires supplying a specially crafted input to a known library, the risk poses a low‑to‑moderate threat that can be mitigated by updating the library or altering its configuration.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the pypdf library to version 6.21.3 or later, which eliminates the memory‑excess flaw.
  • If an upgrade cannot be performed immediately, run applications with pypdf strict mode disabled to prevent the exploit path.
  • Enforce input validation or sandboxing for PDF files processed by the library to restrict size and complexity of malicious inputs.

Generated by OpenCVE AI on October 30, 2026 at 13:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-4vqv-7265-gm2w pypdf has possible large memory usage for exceptions in strict mode
History
Type Values Removed Values Added
CPEs cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-770
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Py-pdf
Py-pdf pypdf
Vendors & Products Py-pdf
Py-pdf pypdf
Type Values Removed Values Added
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.
Title pypdf: Possible large memory usage for exceptions in strict mode
Weaknesses CWE-400
CWE-405
References
Metrics cvssV4_0

{'score': 7.1, 'vector': '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'}

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-405

    Asymmetric Resource Consumption (Amplification)

  • CWE-770

    Allocation of Resources Without Limits or Throttling

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 30, 2026, 5:12 PM
Reserved
Oct 29, 2026, 4:04 PM
Status
Analyzed
Published
Oct 29, 2026, 9:17 PM
Modified
Nov 2, 2026, 4:06 PM
Severity
Moderate
Public date
Oct 29, 2026, 8:38 PM