Impact
The vulnerability in llama.cpp arises from an integer overflow in the ggml_nbytes function. By crafting a GGUF file with specific tensor dimensions, an attacker can cause the function to return a size that is dramatically smaller than the actual memory required, leading to a heap-based buffer overflow. This chain of events can corrupt the heap, enabling the attacker to execute arbitrary code. The weakness is a classic integer overflow (CWE-190) resulting in memory corruption (CWE-122).
Affected Systems
The affected product is llama.cpp from ggml-org. Versions released before the b7824 commit are vulnerable. The fix is included in release b7824 and later.
Risk and Exploitability
The CVSS score of 7.8 indicates a high severity. The lack of an EPSS score makes it difficult to gauge current exploitation probability, but the absence of a known exploit in the KEV catalog suggests limited active exploitation yet. Exploitation requires an attacker to supply a malicious GGUF file to the application, which may be feasible if the service parses untrusted files or receives files from network or local users. Because the vulnerability leads to a heap buffer overflow, exploitation can result in code execution with the privileges of the running process.
OpenCVE Enrichment