← VULNERABILITIES

CVE-2026-137057

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

High · 8.7Fix available
CVSS
8.7
EPSS
1.27% (p70)
Published
2026-11-25
Age
3d old
Modified
2026-11-26
Product
ggml-org llama.cpp

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

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.

Fixed in

b12604

Affected packages

EcosystemPackageRangeFixed
vendorllama.cpp>=b7118, <b12604b12604

Sources

  • NVD · first seen 3d ago · NVD terms of use
  • OSV · first seen 3d ago · CC-BY 4.0
  • CVE List · first seen 3d ago · CVE Terms of Use

References

JSON