CVE-2024-58399

llama.cpp before b2731 Out-of-Bounds Read via GGUF Tensor Offsets

Published Oct 27, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
Description
llama.cpp before b2731 contains an out-of-bounds read vulnerability in llama_model_loader that allows attackers to read memory outside the mapped model file via crafted GGUF tensor offsets. Attackers can supply a crafted or truncated GGUF model file with arbitrary 64-bit tensor offsets to crash the process or load adjacent process memory as model weights.

Analysis

AI-generated

Technical impact

The vulnerability resides in the llama_model_loader of llama.cpp and allows an out-of-bounds read when the program processes a GGUF tensor with an invalid 64‑bit offset. An attacker can supply a crafted or truncated GGUF model file, causing the library to read beyond the bounds of the mapped model file and potentially expose adjacent process memory as model weights. This can lead to memory disclosure or a crash that results in denial of service. The weakness is classified as CWE-125.

Affected Systems

All releases of llama.cpp from the ggml-org organization before the b2731 build are affected. The issue is demonstrated in commits prior to the b2731 tag, and updating to version b2731 or later removes the vulnerability. Users running older builds must check the release history and apply the patch accordingly.

Risk and Exploitability

The CVSS score of 6.9 indicates moderate risk, while the EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog. The primary attack vector is likely local; based on the description, it is inferred that the attacker must supply a malicious GGUF file to the application. Upon exploitation, the attacker may read memory outside the model file and potentially extract sensitive data or cause a crash, but the exploit requires local file input and does not provide remote code execution.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade llama.cpp to version b2731 or later, which eliminates the out-of-bounds read in llama_model_loader.
  • Validate GGUF tensor offsets before loading to ensure they fall within the bounds of the mapped file and reject any offsets that exceed the file size.
  • Monitor application logs for segmentation faults or abnormal terminations and apply any additional vendor security notices promptly.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Ggml-org
Ggml-org llama.cpp
Vendors & Products Ggml-org
Ggml-org llama.cpp
Type Values Removed Values Added
Description llama.cpp before b2731 contains an out-of-bounds read vulnerability in llama_model_loader that allows attackers to read memory outside the mapped model file via crafted GGUF tensor offsets. Attackers can supply a crafted or truncated GGUF model file with arbitrary 64-bit tensor offsets to crash the process or load adjacent process memory as model weights.
Title llama.cpp before b2731 Out-of-Bounds Read via GGUF Tensor Offsets
First Time appeared Ggml
Ggml llama.cpp
Weaknesses CWE-125
CPEs cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*
Vendors & Products Ggml
Ggml llama.cpp
References
Metrics cvssV3_1

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

cvssV4_0

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

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 2, 2026, 6:54 PM
Reserved
Oct 27, 2026, 12:10 AM
Status
Awaiting Analysis
Published
Oct 27, 2026, 1:19 AM
Modified
Nov 2, 2026, 7:17 PM