CVE-2026-137057 llama.cpp b7118 before b12604 Integer Underflow in Grammar Parser parse_sequence
HighCVSS 8.7
EPSS 1.3%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: partial
- Technology
- Ubuntu
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.
Upgrade path
3 packages: 1 fixed, 2 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/llama.cpp(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/llama.cpp(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| ggml-org llama.cpp | >= b7118, < b12604 | b12604 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| ggml-org llama.cpp | >= b7118, < b12604 | b12604 |
| ubuntu/llama.cpp(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/llama.cpp(Ubuntu:26.10) | All versions | No fix listed |
References
- github.com exploit issue-tracking
- github.com issue-tracking patch
- github.com patch
- github.com technical-description
- llama.cpp b12604 Release Notes release-notes
- VulnCheck Advisory: llama.cpp b7118 before b12604 Integer Underflow in Grammar Parser parse_sequence third-party-advisory
- ENISA EUVD EUVD-2026-135711 third-party-advisory
- nvd.nist.gov
- Ubuntu CVE tracker vendor-advisory
- www.cve.org