CVE-2026-71870

pypdf: Possible large memory usage for large /ToUnicode streams

Published Aug 7, 2026 CVSS 4.0 · 4.8 Medium EPSS < 1% KEV · Not listed
Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.15.0, a crafted PDF can cause large memory consumption when pypdf/_cmap.py function parse_bfrange parses unusually large source-code or destination-string tokens in a font /ToUnicode CMap during text extraction. This issue is fixed in 6.15.0.

Analysis

AI-generated

Technical impact

The flaw in pypdf is triggered when the parse_bfrange routine processes unusually large source‑code or destination‑string tokens in a font /ToUnicode CMap while extracting text. A crafted PDF can cause pypdf to allocate a large amount of memory, leading to process instability or termination. This represents a classic CWE‑400 problem and a CWE‑770 vulnerability that results in a denial‑of‑service condition for the application reading the PDF.

Affected Systems

The issue affects the pypdf library provided by py‑pdf. Versions prior to 6.15.0 are vulnerable; upgrading to 6.15.0 or later resolves the problem.

Risk and Exploitability

The CVSS score of 4.8 indicates moderate severity, and no EPSS data is available, so the historical exploitation likelihood is unclear. Based on the description, it is inferred that any PDF that is parsed by the affected library could trigger the vulnerability, implying a local or user‑controlled attack vector. Although not listed in KEV, the absence of a known public exploit does not reduce the risk of an attacker sending a malicious PDF to a service that uses pypdf.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update pypdf to version 6.15.0 or later to remove the vulnerability.
  • If an upgrade is not immediately possible, isolate PDF processing in a sandboxed environment with strict memory limits to mitigate the potential denial‑of‑service impact.
  • Consider validating PDF file sizes or rejecting exceptionally large /ToUnicode streams before invoking pypdf to reduce the risk of excessive memory consumption.

Generated by OpenCVE AI on August 8, 2026 at 01:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-fp3f-mc75-235c pypdf: Possible large memory usage for large /ToUnicode streams
History
Type Values Removed Values Added
CPEs cpe:2.3:a:pypdf_project:pypdf:*:*:*:*:*:*:*:* cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*
Vendors & Products Pypdf Project
Pypdf Project pypdf
Type Values Removed Values Added
First Time appeared Pypdf Project
Pypdf Project pypdf
CPEs cpe:2.3:a:pypdf_project:pypdf:*:*:*:*:*:*:*:*
Vendors & Products Pypdf Project
Pypdf Project pypdf
Metrics 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'}

cvssV3_1

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

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.15.0, a crafted PDF can cause large memory consumption when pypdf/_cmap.py function parse_bfrange parses unusually large source-code or destination-string tokens in a font /ToUnicode CMap during text extraction. This issue is fixed in 6.15.0.
Title pypdf: Possible large memory usage for large /ToUnicode streams
Weaknesses CWE-400
References
Metrics cvssV4_0

{'score': 4.8, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-770

    Allocation of Resources Without Limits or Throttling

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 10, 2026, 12:24 PM
Reserved
Aug 7, 2026, 6:26 PM
Status
Analyzed
Published
Aug 7, 2026, 8:16 PM
Modified
Nov 2, 2026, 4:06 PM
Severity
Moderate
Public date
Aug 7, 2026, 7:28 PM