{"id":"CVE-2026-137057","aliases":[],"url":"https://o3.security/vulnerability/CVE-2026-137057","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…","details":"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":"2026-11-25T20:18:39.307","modified":"2026-11-25T20:18:39.450","cvss":{"score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[],"fix":{"url":"https://github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc815e5","label":"ggml-org/llama.cpp@46eb174"},"references":[{"type":"WEB","url":"https://github.com/ggml-org/llama.cpp/blob/b12603/src/llama-grammar.cpp#L519-L522"},{"type":"WEB","url":"https://github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc815e5"},{"type":"WEB","url":"https://github.com/ggml-org/llama.cpp/issues/32550"},{"type":"WEB","url":"https://github.com/ggml-org/llama.cpp/pull/32551"},{"type":"WEB","url":"https://github.com/ggml-org/llama.cpp/releases/tag/b12604"},{"type":"WEB","url":"https://www.vulncheck.com/advisories/llama-cpp-b7118-before-b12604-integer-underflow-in-grammar-parser-parse-sequence"},{"type":"WEB","url":"https://github.com/ggml-org/llama.cpp/issues/32550"}],"provenance":{"sources":["OSV.dev","NVD","FIRST.org (EPSS)"],"lastVerified":"2026-11-25T20:18:39.450"}}