CVE-2026-137057
HIGH 8.7CVSS 4.0llama.cpp b7118 before b12604 Integer Underflow in Grammar Parser parse_sequence
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.
- Published
- 25 Nov 2026
- Last modified
- 25 Nov 2026
- Assigned by
- disclosure@vulncheck.com
- NVD status
- Awaiting Analysis
- Weakness
- CWE-191
- Sources
- NVDJSONCVE ListJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | disclosure@vulncheck.com (Secondary) | CVSS 4.0 | HIGH 8.7 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| CVE List | VulnCheck | CVSS 4.0 | HIGH 8.7 | 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 |
| NVD | disclosure@vulncheck.com (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| CVE List | VulnCheck | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| CVE List | CISA-ADP | SSVC | Exploitation: poc; Automatable: yes; Technical Impact: partial |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| CVE List | ggml-org | llama.cpp | >= b7118, < b12604 | b12604 |
References
- https://github.com/ggml-org/llama.cpp/blob/b12603/src/llama-grammar.cpp#L519-L522 · technical-description
- https://github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc815e5 · patch
- https://github.com/ggml-org/llama.cpp/issues/32550 · issue-tracking
- https://github.com/ggml-org/llama.cpp/pull/32551 · issue-tracking, patch
- https://github.com/ggml-org/llama.cpp/releases/tag/b12604 · release-notes
- https://www.vulncheck.com/advisories/llama-cpp-b7118-before-b12604-integer-underflow-in-grammar-parser-parse-sequence · third-party-advisory
History
- 25 Nov 2026 20:55 UTC · CVE List: first stored (published 25 Nov 2026)
- 25 Nov 2026 20:30 UTC · NVD: first stored (published 25 Nov 2026)