CVE-2026-137057
JSON

8.7high

llama.cpp b7118 before b12604 Integer Underflow in Grammar Parser parse_sequence

Severity
8.7high CVSS:4.0 by VulnCheck
Exploit likelihood
1.27% (higher than 70% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
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.

Affected

Product or packageVersionsReported by
ggml-org llama.cppfrom b7118 before b12604CVE List

All scores

VulnCheck8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
VulnCheck7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-191

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-137057 changed 2026-11-25CVE Terms of Use
NVDCVE-2026-137057 changed 2026-11-25Public domain