llama.cpp b7118 before b12604 Integer Underflow in Grammar Parser parse_sequence
- State
- Published
- Severity
- 8.7 High
- Published
- Nov 25, 2026
- Updated
- Nov 25, 2026
- Reserved
- Nov 25, 2026
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.
| Product | Versions |
|---|---|
| llama.cpp ggml-org | b7118 to before b12604 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 8.7 High | VulnCheck | |
| 3.1 | 7.5 High | VulnCheck |
Weaknesses
- CWE-191 Integer Underflow (Wrap or Wraparound)
References
- https://github.com/ggml-org/llama.cpp/issues/32550Issue Tracker
- https://github.com/ggml-org/llama.cpp/pull/32551Issue TrackerPatch
- https://github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc815e5Patch
- https://github.com/ggml-org/llama.cpp/blob/b12603/src/llama-grammar.cpp#L519-L522Technical Details
- llama.cpp b12604 Release NotesRelease Notes
- VulnCheck Advisory: llama.cpp b7118 before b12604 Integer Underflow in Grammar Parser parse_sequenceThird-Party Advisory
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.