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.
{
"cna_assigner": "VulnCheck",
"cwe_ids": [
"CWE-191"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/137xxx/CVE-2026-137057.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "b7118"
},
{
"fixed": "b12604"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"range": [
{
"fixed": "46eb1742db6d2caec1bfa848c5702b1bdcc815e5"
}
],
"source": "REFERENCES_COMMIT"
},
{
"original_tag": "b12604",
"range": [
{
"fixed": "46eb1742db6d2caec1bfa848c5702b1bdcc815e5"
}
],
"source": "REFERENCES_TAG"
}
]
}