Elevated
llama.cpp grammar parser integer underflow lets attackers hang the server and exhaust memory
CVE-2026-137057
Anyone can send a request that freezes an AI model server.
- CVE
- CVE-2026-137057 (opens in a new tab)
- Score
- CVSS 8.7
- Public date
- 2026-11-18
- First seen
8.7
Products
Mitigation
Update to llama.cpp b12604 or later.
Summary
An integer underflow in the llama.cpp grammar parser function llama_grammar_parser::parse_sequence lets an unauthenticated remote attacker hang the process and exhaust memory through a llama-server request. Versions from b7118 up to, but not including, b12604 are affected.
Exploit code is public
Affected when
llama-server accepts a grammar field in /completion requests
5 other Incidents of this product in the last 30 days
Incidents by product: llama.cpp
Other recent Incidents of llama.cpp
Read the advisory · github.com (opens in a new tab)
- Advisory: github.com (opens in a new tab)
Write-up (3): github.com, vulncheck.com
- CVE record: cve.org (opens in a new tab)
- Repository: googlesky/CVE-2026-137057 (opens in a new tab)