Description
A flaw has been found in ggml-org llama.cpp up to 55abc39. Impacted is the function llama_grammar_advance_stack of the file llama.cpp/src/llama-grammar.cpp of the component GBNF Grammar Handler. This manipulation causes stack-based buffer overflow. The attack needs to be launched locally. The exploit has been published and may be used. Patch name: 18993. To fix this issue, it is recommended to deploy a patch.
Problem types
Product status
Timeline
| 2026-02-06: | Advisory disclosed |
| 2026-02-06: | VulDB entry created |
| 2026-02-06: | VulDB entry last update |
Credits
TYGLS (VulDB User)
References
vuldb.com/?id.344636 (VDB-344636 | ggml-org llama.cpp GBNF Grammar llama-grammar.cpp llama_grammar_advance_stack stack-based overflow)
vuldb.com/?ctiid.344636 (VDB-344636 | CTI Indicators (IOB, IOC, IOA))
vuldb.com/?submit.745263 (Submit #745263 | llama.cpp commit 55abc39 Stack-based Buffer Overflow)
github.com/ggml-org/llama.cpp/issues/18988
github.com/ggml-org/llama.cpp/issues/18988
github.com/user-attachments/files/24761101/poc.zip
github.com/ggml-org/llama.cpp/pull/18993
github.com/ggml-org/llama.cpp/