CVE-2024-58399
Received Received - Intake

Out-of-Bounds Read in llama.cpp GGUF Model Loader

Vulnerability report for CVE-2024-58399, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-27

Last updated on: 2026-10-27

Assigner: VulnCheck

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-27
Last Modified
2026-10-27
Generated
2026-10-27
AI Q&A
2026-10-27
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
ggml-org llama.cpp b1046

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-125 The product reads data past the end, or before the beginning, of the intended buffer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2024-58399 is an out-of-bounds read vulnerability in llama.cpp before version b2731. It occurs in the llama_model_loader component when processing GGUF model files. The issue arises because the loader does not verify if tensor data is fully contained within the file before accessing it via memory-mapped files (mmap). Attackers can exploit this by providing a crafted or truncated GGUF file with arbitrary tensor offsets, causing the application to read memory outside the intended model file boundaries. This can lead to crashes or loading adjacent process memory as model weights.

Detection Guidance

To detect this vulnerability, monitor for crashes or segmentation faults when loading GGUF model files in llama.cpp versions before b2731. Check for error codes like -1073741819 (0xC0000005) which indicate access violations. Validate model file integrity before processing.

Impact Analysis

This vulnerability can impact users by causing application crashes when processing corrupted or incomplete GGUF model files. It may lead to denial-of-service conditions or expose sensitive memory contents if adjacent process memory is loaded as model weights. Users relying on memory-mapped files for model loading are particularly affected, especially in environments where file integrity checks are insufficient.

Mitigation Strategies

Upgrade to llama.cpp version b2731 or later which includes the fix for tensor offset validation. Ensure all GGUF model files are complete and not truncated before loading. Implement file integrity checks during download and storage.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2024-58399. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart