Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.21.4, pypdf can consume excessive memory while parsing a crafted PDF page tree containing many shared resources. Page-tree flattening copies page dictionary and inherited resource entries without a document-wide entry budget, allowing the crafted resource structure to cause disproportionate allocations. This issue is fixed in version 6.21.4.
Published: 2026-10-29
Score: 7.1 High
EPSS: n/a
KEV: No
Impact: Excessive memory consumption leading to denial of service
Action: Patch
AI Analysis

Impact

The vulnerability arises when pypdf parses a PDF document whose page tree contains a large number of shared resources. During page‑tree flattening, pypdf copies page dictionaries and inherited resource entries without imposing a document‑wide allocation budget, which enables a crafted PDF to trigger disproportionate memory allocations. The resulting memory exhaustion can cause the process that is parsing the PDF to hang or crash, effectively denying service to the application that relies on pypdf. This flaw is associated with input validation weakness, CWE‑400.

Affected Systems

Affected product: py‑pdf pypdf before version 6.21.4. Versions prior to the 6.21.4 release lack the mitigations that bound resource usage during page‑tree processing.

Risk and Exploitability

The CVSS score of 7.1 indicates a medium‑to‑high severity. EPSS data is not available, so the probability of exploitation cannot be quantified from that metric. The vulnerability is not listed in the CISA KEV catalog. Attackers can exploit this flaw by delivering a carefully crafted PDF to any application that uses pypdf to parse the file. The likely attack vector is local – a developer or user opens a malicious PDF – but can also be leveraged remotely if the PDF is processed by a web service or API that uses pypdf. The lack of a publication of a public exploit suggests the risk is moderate, but the deterministic nature of the memory exhaustion makes it a viable denial‑of‑service vector.

Generated by OpenCVE AI on October 29, 2026 at 21:29 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Install pypdf 6.21.4 or later to apply the memory‑budget fix.
  • Configure runtime memory limits for the Python process that uses pypdf to prevent an OOM condition from impacting the entire system.
  • Add monitoring and alerts for abnormal memory growth in services that parse PDFs to detect and mitigate potential exploitation in a timely manner.

Generated by OpenCVE AI on October 29, 2026 at 21:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 29 Oct 2026 20:45:00 +0000

Type Values Removed Values Added
Description pypdf is a free and open-source pure-python PDF library. Prior to 6.21.4, pypdf can consume excessive memory while parsing a crafted PDF page tree containing many shared resources. Page-tree flattening copies page dictionary and inherited resource entries without a document-wide entry budget, allowing the crafted resource structure to cause disproportionate allocations. This issue is fixed in version 6.21.4.
Title pypdf: Possible large memory usage when parsing page tree
Weaknesses CWE-400
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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-29T20:34:02.704Z

Reserved: 2026-10-29T16:04:48.729Z

Link: CVE-2026-119204

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-29T21:17:19.527

Modified: 2026-10-29T21:17:19.527

Link: CVE-2026-119204

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-29T21:30:15Z

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption