Vulnerability 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.
CVSS Score
HIGH
Related Weaknesses (CWE)
References
- https://github.com/ggml-org/llama.cpp/blob/b12603/src/llama-grammar.cpp#L519-L52
- https://github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc
- https://github.com/ggml-org/llama.cpp/issues/32550
- https://github.com/ggml-org/llama.cpp/pull/32551
- https://github.com/ggml-org/llama.cpp/releases/tag/b12604
- https://www.vulncheck.com/advisories/llama-cpp-b7118-before-b12604-integer-under
- https://github.com/ggml-org/llama.cpp/issues/32550
FAQ
What is CVE-2026-137057?
CVE-2026-137057 is a vulnerability with a CVSS score of 7.5 (HIGH). 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 supp...
How severe is CVE-2026-137057?
CVE-2026-137057 has been rated HIGH with a CVSS base score of 7.5/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2026-137057?
Check the references section above for vendor advisories and patch information. Review vendor security bulletins for remediation guidance.