CVE-2026-137057
Awaiting Analysis Awaiting Analysis - Queue

Integer Underflow in llama.cpp Grammar Parser

Vulnerability report for CVE-2026-137057, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-25

Last updated on: 2026-11-25

Assigner: VulnCheck

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-25
Last Modified
2026-11-25
Generated
2026-11-25
AI Q&A
2026-11-25
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Currently, no data is known.

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-191 The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is an integer underflow in the llama.cpp library before version b12604. It occurs in the llama_grammar_parser::parse_sequence() function where attackers can exploit grammar repetitions with max values lower than min values. By sending a grammar like {5,2} in a llama-server /completion request, they generate endless repetition rules that cause the process to hang and exhaust memory resources.

Impact Analysis

This vulnerability allows unauthenticated remote attackers to cause denial of service by crashing the llama-server process and consuming excessive memory. This can disrupt services relying on the llama.cpp library, leading to downtime and potential loss of availability for applications using affected versions.

Mitigation Strategies

Update llama.cpp to version b12604 or later to fix the integer underflow in llama_grammar_parser::parse_sequence(). Monitor network traffic for malformed GBNF grammar requests with patterns like {5,2} in the grammar field of /completion requests.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-137057. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...