{"id":"CVE-2026-137057","aliases":["CVE-2026-137057"],"related":[],"kind":"vulnerability","state":"published","title":"llama.cpp b7118 before b12604 Integer Underflow in Grammar Parser parse_sequence","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-11-25T19:33:20.574Z","modified":"2026-11-25T20:18:39.450Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-191"],"affected":[{"ranges":[{"type":"custom","introduced":"b7118","fixed":"b12604","status":"affected"}],"vendor":"ggml-org","product":"llama.cpp","repo":"https://github.com/ggml-org/llama.cpp","source":"cvelist"}],"references":[{"url":"https://github.com/ggml-org/llama.cpp/issues/32550","tags":["exploit","issue-tracking"],"sources":["cvelist","nvd"]},{"url":"https://github.com/ggml-org/llama.cpp/pull/32551","tags":["issue-tracking","patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc815e5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/ggml-org/llama.cpp/blob/b12603/src/llama-grammar.cpp#L519-L522","tags":["technical-description"],"sources":["cvelist","nvd"]},{"url":"https://github.com/ggml-org/llama.cpp/releases/tag/b12604","tags":["release-notes"],"sources":["cvelist","nvd"]},{"url":"https://www.vulncheck.com/advisories/llama-cpp-b7118-before-b12604-integer-underflow-in-grammar-parser-parse-sequence","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":["Daniil Kuts"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-11-25T19:53:21.993Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-137057","url":"https://www.cve.org/CVERecord?id=CVE-2026-137057","licence":"CVE Terms of Use","modified":"2026-11-25T19:53:43.377Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-137057","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-137057","licence":"Public domain","modified":"2026-11-25T20:18:39.450Z"}],"updatedAt":"2026-11-25T23:18:44.307Z","epss":{"score":0.01269,"percentile":0.70618,"date":"2026-12-01T12:00:22.000Z"}}