Integer Underflow Vulnerability in Llama.cpp by GGML
CVE-2026-137057

8.7HIGH

Key Information:

Vendor

Ggml-org

Status
Vendor
CVE Published:
25 November 2026

What is CVE-2026-137057?

An integer underflow vulnerability exists in the llama_grammar_parser::parse_sequence() function of llama.cpp versions prior to b12604. This weakness allows unauthenticated remote attackers to exploit the grammar field of a llama-server /completion request by providing GBNF repetitions where the maximum value is less than the minimum value. Specifically, attackers can craft grammars like {5,2}, which can cause the parsing process to enter a loop that leads to excessive memory consumption and ultimately a denial of service. This vulnerability poses a significant risk as it can be triggered remotely without authentication.

Affected Version(s)

llama.cpp b7118

References

CVSS V4

Score:
8.7
Severity:
HIGH
Confidentiality:
None
Integrity:
None
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Attack Required:
None
Privileges Required:
Undefined
User Interaction:
None

Timeline

  • Vulnerability published

  • Vulnerability Reserved

Credit

Daniil Kuts
.