High severity7.5NVD Advisory· Published Nov 25, 2026· Updated Nov 25, 2026
CVE-2026-137057
CVE-2026-137057
Description
llama.cpp from b7118 before b12604 contains an integer underflow vulnerability in llama_grammar_parser::parse_sequence() that allows unauthenticated remote attackers to cause denial of service by supplying GBNF repetitions with max lower than min. Attackers can send a grammar like {5,2} in the grammar field of a llama-server /completion request, wrapping n_opt to generate endless repetition rules that hang the process and exhaust memory.
Affected products
1Patches
Vulnerability mechanics
References
6- github.com/ggml-org/llama.cpp/blob/b12603/src/llama-grammar.cppnvd
- github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc815e5nvd
- github.com/ggml-org/llama.cpp/issues/32550nvd
- github.com/ggml-org/llama.cpp/pull/32551nvd
- github.com/ggml-org/llama.cpp/releases/tag/b12604nvd
- www.vulncheck.com/advisories/llama-cpp-b7118-before-b12604-integer-underflow-in-grammar-parser-parse-sequencenvd
News mentions
0No linked articles in our index yet.