Skip to content
HighVulnerabilityLLM-specific

CVE-2026-137057: llama.cpp integer underflow in GBNF grammar parsing enables denial of service

Identifier
CVE-2026-137057
Published
Record updated
View JSON
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
1.3%Estimated probability that this CVE is exploited in the next 30 days, from the FIRST Exploit Prediction Scoring System. Read on .

Summary

llama.cpp versions from b7118 before b12604 contain an integer underflow in llama_grammar_parser::parse_sequence(). An unauthenticated remote attacker can send a GBNF grammar with a repetition max lower than min, such as {5,2}, in the grammar field of a llama-server /completion request, causing the process to hang and exhaust memory.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.