Read the docs

Integer underflow in llama.cpp grammar parser allows remote DoS

Priority HIGH 77CWE-191Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-191 and the CVSS impact.

Summary

llama.cpp from b7118 before b12604 contains an integer underflow (CWE-191) in the GBNF grammar parser that allows unauthenticated remote attackers to cause a denial of service. Supplying a repetition with a maximum lower than the minimum, such as {5,2} in the grammar field of a llama-server /completion request, wraps a counter and generates endless repetition rules. The process hangs and exhausts memory.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

Description from the CNA

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.01269 69th percentileScored 2026-11-30
Fix Fixed llama.cpp (ggml-org): b12604

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
ggml-orgllama.cppb7118 to before b12604b12604Patch availableCNA
  • llama.cpp Vendorggml-org Affected b7118 to before b12604 Fixed in b12604 Patch available CNA

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*——ggml-org
  • cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:* Versions — — ·ggml-org

Remediation

Update llama.cpp to b12604, which fixes the flaw. The sources list no advisory identifier for this fix.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

  • Fix · CNA llama.cpp (ggml-org) Fixed in b12604

Timeline

  1. 2026-11-25 Threatist record created from CVE-2026-137057
  2. 2026-11-25 Alias added: GHSA-f86p-wv5j-r5vj

References

  • TI-2026-26459 llama.cpp: Unauthenticated RCE via GRAPH_COMPUTE buffer=0 bypass in llama.cpp RPC backend CVSS 3.1CRITICAL 9.8
  • TI-2024-28446 llama.cpp allows Arbitrary Address Read in rpc_server::get_tensor CVSS 3.1CRITICAL 9.8
  • TI-2026-17570 llama.cpp has Out-of-bounds Write in llama-server CVSS 3.1CRITICAL 9.8
  • TI-2024-28447 llama.cpp allows write-what-where in rpc_server::set_tensor CVSS 3.1CRITICAL 10.0
  • TI-2024-15627 Integer overflow in ggml-org llama.cpp CVSS 3.1CRITICAL 9.8
  • TI-2024-14482 Heap-based buffer overflow in ggml-org llama.cpp CVSS 3.1CRITICAL 9.8
See all 61 →

Sources