Impact
A stack-based buffer overflow has been discovered in the llama_grammar_advance_stack function of ggml-org’s llama.cpp, affecting versions up to the 55abc39 commit. The flaw occurs when the GBNF Grammar Handler processes malformed input and overflows a local stack buffer. Attackers must operate locally on the machine running llama.cpp, but once the overflow is triggered, the attacker may gain arbitrary code execution on that system.
Affected Systems
ggml-org’s llama.cpp up to commit 55abc39 is affected. No specific sub‑release versions are listed beyond this commit identifier.
Risk and Exploitability
The CVSS score is 4.8, indicating low severity, and the EPSS score is below 1%, meaning the likelihood of exploitation is minimal. The vulnerability is not listed in CISA’s KEV catalog. Because the attack requires local execution, the risk is confined to systems where a malicious user has local access. Nonetheless, the presence of a publicly available exploit means that any local user who can feed crafted grammar input could potentially trigger arbitrary code execution.
OpenCVE Enrichment