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

State
Published
Severity
8.7 High
Published
Nov 25, 2026
Updated
Nov 25, 2026
Reserved
Nov 25, 2026

Read the record on cve.org

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.

ProductVersions
llama.cpp ggml-orgb7118 to before b12604 Affected

Weaknesses

  • CWE-191 Integer Underflow (Wrap or Wraparound)

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.