CVE-2026-137057
Malformed grammar repetition could exhaust llama-server memory
ggml-org · llama.cpp grammar parser
First documented disclosure · Review checkpoint
Summary
A request-supplied grammar could hang the server and consume memory.
Severity and exploitation evidence
High · 8.7/10 · CVSS 4.0. Severity source.
Exploitation not established: Public original advisories and static source evidence only; no exploit, package, provider request or upstream test was executed. No malicious exploitation against users is established by this review.
Technical severity is not a measure of observed attacks or of risk to your deployment. Attempts, demonstrations, and successful compromise retain the qualifications in the source.
How the weakness works
A repetition maximum lower than its minimum underflowed an unsigned count and generated excessive repetition rules.
Conditions required
An attacker can submit a grammar to an affected llama-server completion path; configured deployment access controls still govern reachability.
Potential impact
Service denial and memory exhaustion.
Affected versions and configurations
b7118 through builds before b12604, according to the CNA.
Fix and mitigation status
b12604 contains the explicit max_times<min_times rejection. GitHub marks this published build as a prerelease.
Practical next steps
Use a corrected build and restrict untrusted grammar inputs and request resource use.
Operating lesson
Check relationships between parser bounds before unsigned arithmetic.
Evidence and limits
The original issue and public correction opened November 18; the correction merged November 21 and build b12604 was published that day. November 25 CVE publication is later. Source inclusion was checked in the tagged production parser. The CNA ratesCVSS 4.0High 8.7 andCVSS 3.1High 7.5; the record uses the former. The controlled denial-of-service report is not malicious exploitation.
Sources
- Original grammar denial-of-service report
Primary source ·
- Issue-specific correction
Primary source ·
- b12604 prerelease build
Primary source ·
- Tagged grammar bounds check
Primary source ·
- Exact CVE authority record
Primary source ·