CVE-2024-58399: llama.cpp out-of-bounds read in llama_model_loader

CVE-2024-58399 · Severity: medium · CVSS 6.1 · Published 2026-10-27

llama.cpp is a C++ library that loads and runs large language models. An attacker can supply a crafted GGUF model file with malformed tensor offsets that cause the library to read memory outside the model file, potentially crashing the application or exposing sensitive data from adjacent memory regions. This could be exploited when loading untrusted model files.

Technologies: Ggml-Org Llama.Cpp. Vendors: Ggml-Org.

Quick answers

Is CVE-2024-58399 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2024-58399 being exploited in the wild.
How severe is CVE-2024-58399?
Medium severity, with a CVSS score of 6.1, published 27 October 2026.
Which products and versions are affected?
Ggml-Org Llama.Cpp before b2731.
Is there a fix for CVE-2024-58399?
Yes: fixed in b2731. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2024-58399 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2024-58399?
Check whether you run Ggml-Org Llama.Cpp at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: b2731

Technical details

The vulnerability is an out-of-bounds read in the llama_model_loader's tensor offset handling, where crafted 64-bit tensor offsets in GGUF files can cause reads beyond the mapped file boundaries. The attack requires supplying a malicious or truncated GGUF model file; no authentication or special network access is required. An attacker can crash the process or read adjacent process memory that may contain sensitive information.

Affected products

  • ggml-org llama.cpp before b2731

Timeline

  • 2024-10-27: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.