llama.cpp is an inference of several LLM models in C/C++. Prior to b8146, the ggufinitfromfileimpl() in gguf.cpp is vulnerable to an Integer overflow, leading to an undersized heap allocation. Using the subsequent fread() writes 528+ bytes of attacker-controlled data past the buffer boundary. This is a bypass of a similar bug in the same file - CVE-2025-53630, but the fix overlooked some areas. This vulnerability is fixed in b8146.
{
"cwe_ids": [
"CWE-122",
"CWE-190"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/27xxx/CVE-2026-27940.json",
"cna_assigner": "GitHub_M"
}{
"cpe": "cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*",
"extracted_events": [
{
"introduced": "0"
},
{
"fixed": "b8146"
}
],
"source": [
"AFFECTED_FIELD",
"CPE_RANGE"
]
}