llama.cpp from b7118 before b12604 contains an integer underflow vulnerability in llamagrammarparser::parsesequence() that allows…
CVE-2026-137057
llama.cpp from b7118 before b12604 contains an integer underflow vulnerability in llamagrammarparser::parsesequence() 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 nopt to generate endless repetition rules that hang the process and exhaust memory.
Part of the AI stack
This affects llama.cpp, in Inference & serving.
Assessment
- CVSS
- 8.7 (v4.0)
- Severity
- High
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 25 November 2026
- Last updated
- 25 November 2026
- Assigner
- VulnCheck
CVSS vectorCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
At the source
References
- https://github.com/ggml-org/llama.cpp/issues/32550
- https://github.com/ggml-org/llama.cpp/pull/32551
- https://github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc815e5
- https://github.com/ggml-org/llama.cpp/blob/b12603/src/llama-grammar.cpp#L519-L522
- https://github.com/ggml-org/llama.cpp/releases/tag/b12604
- https://www.vulncheck.com/advisories/llama-cpp-b7118-before-b12604-integer-underflow-in-grammar-parser-parse-sequence
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-137057