CVE-2026-137057
llama.cpp b7118 before b12604 Integer Underflow in Grammar Parser parse_sequence
CVSS Score
7.5
EPSS Score
0.0%
EPSS Percentile
0th
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.
| CWE | CWE-191 |
| Vendor | ggml-org |
| Product | llama.cpp |
| Published | Nov 25, 2026 |
| Last Updated | Nov 25, 2026 |
Stay Ahead of the Next One
Get instant alerts for ggml-org llama.cpp
Be the first to know when new high vulnerabilities affecting ggml-org llama.cpp are published โ delivered to Slack, Telegram or Discord.
Get Free Alerts โ
Free ยท No credit card ยท 60 sec setup
CVSS v3 Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Affected Versions
ggml-org / llama.cpp
b7118 < b12604
References
github.com: https://github.com/ggml-org/llama.cpp/issues/32550 github.com: https://github.com/ggml-org/llama.cpp/pull/32551 github.com: https://github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc815e5 github.com: https://github.com/ggml-org/llama.cpp/blob/b12603/src/llama-grammar.cpp#L519-L522 github.com: https://github.com/ggml-org/llama.cpp/releases/tag/b12604 vulncheck.com: https://www.vulncheck.com/advisories/llama-cpp-b7118-before-b12604-integer-underflow-in-grammar-parser-parse-sequence
Credits
Daniil Kuts