home / blog
2026-11-26 · high
CVE-2026-137057: Integer underflow causes denial of service
Integer underflow vulnerability in llama allows denial of service via malformed GBNF repetitions. CVSS 7.5.

CVE-2026-137057 is an integer underflow vulnerability in llama.cpp versions before b12604. The vulnerability exists in the llama_grammar_parser::parse_sequence() function and allows unauthenticated remote attackers to cause denial of service by sending GBNF repetitions with max lower than min, which generate endless repetition rules that hang the process and exhaust memory.
The vulnerability is rated as severe with a CVSS score of 7.5. NVD published the advisory on November 25, 2026. GitHub reports confirm the technical risk with proof of concept code. The declared severity is high and consistent with the CVSS score.
For defense, it is recommended to immediately apply the patch by updating to llama.cpp version b12604 or later. Until patched, the risk can be mitigated by limiting the use of GBNF repetitions in server requests and monitoring excessive memory usage by the process. Implementing input validation to prevent the submission of malicious grammar patterns is also important.
At a glance
- What
- Integer underflow in llama_grammar_parser::parse_sequence() that allows denial of service via GBNF repetitions with max lower than min
- Severity
- High (CVSS 7.5)
- Affected versions
- before b12604
- Fix
- Update to version b12604 or later
- Status
- Published (2026-11-25)
- Action
- Apply patch and limit use of GBNF repetitions in requests
Sources: NVD, CVE-2026-137057