CVE-2026-137057
published high CVSS 4.0 · 8.7llama.cpp b7118 before b12604 Integer Underflow in Grammar Parser parse_sequence
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| ggml-org | — | llama.cppb7118 to < b12604 · Other versions: unaffected | Affected | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.7 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.5 | high | VulnCheck · cna | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| ggml-org | llama.cpp | b7118 to < b12604 (affected · custom)Default: unaffected | VulnCheck · cna |
Weaknesses
1- CWE-191 Integer Underflow (Wrap or Wraparound)
References
6- https://github.com/ggml-org/llama.cpp/blob/b12603/src/llama-grammar.cpp#L519-L522
- https://github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc815e5
- https://github.com/ggml-org/llama.cpp/issues/32550
- https://github.com/ggml-org/llama.cpp/pull/32551
- llama.cpp b12604 Release Notes https://github.com/ggml-org/llama.cpp/releases/tag/b12604
- VulnCheck Advisory: llama.cpp b7118 before b12604 Integer Underflow in Grammar Parser parse_sequence https://www.vulncheck.com/advisories/llama-cpp-b7118-before-b12604-integer-underflow-in-grammar-parser-parse-sequence
Provider assertions
2VulnCheck · cna
llama.cpp b7118 before b12604 Integer Underflow in Grammar Parser parse_sequence
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 5f9666afa10ea09b5528479dd52cd7db532ab3cacc23a2f5b88830e4f66118b9
- Ingested
- 25 Nov 2026, 19:58:13 UTC
- Source record
- Official CVE record