Impact
The vulnerability in llama.cpp causes a heap buffer overflow due to an integer overflow in the calculation of `mem_size` inside gguf_init_from_file_impl() in gguf.cpp. The overflow results in an undersized heap allocation; subsequently, fread() writes 528+ bytes of attacker-controlled data past the buffer boundary. This is a classic heap-based buffer overflow (CWE-122) triggered by an integer overflow (CWE-190) and can potentially allow an attacker to corrupt memory or execute arbitrary code.
Affected Systems
Affected versions of the ggml-org:llama.cpp library are all releases prior to the commit identifier b8146, which contains the fix referred to in the CVE description. No specific version numbers are listed, so any build of llama.cpp compiled before b8146 is considered vulnerable.
Risk and Exploitability
The CVSS score for this issue is 7.8, indicating a high severity. EPSS is reported as less than 1 %, suggesting a low likelihood of exploitation at present, and the vulnerability is not listed in the CISA KEV catalog. Because the flaw is triggered when a malicious .gguf file is loaded, an attacker would need the ability to supply such a file to the application, implying a local or compromised-host attack vector. If executed, the overflow could lead to remote code execution through the compromised process.
OpenCVE Enrichment