CVE-2026-137057
NVD
Vulnerability Summary
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.
CVSS v4.0 Base Metrics — Score 8.7 (HIGH)
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NAttack VectorNetwork
Attack ComplexityLow
Attack RequirementsNone
Privileges RequiredNone
User InteractionNone
Confidentiality (Vulnerable System)None
Integrity (Vulnerable System)None
Availability (Vulnerable System)High
Confidentiality (Subsequent System)None
Integrity (Subsequent System)None
Availability (Subsequent System)None
Show CVSS v3.x metrics (score 7.5)
CVSS v3.1 Base Metrics — Score 7.5 (HIGH)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HAttack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
ConfidentialityNone
IntegrityNone
AvailabilityHigh
Affected & Patched Versions
- ggml-org llama.cpp >= b7118 and < b12604
- ggml-org llama.cpp b12604
What to do
Plan remediation soon. No exploitation is confirmed yet, but the severity is high.
- Check whether you run ggml-org llama.cpp and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Nov 25, 2026Published
- Nov 25, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new ggml-org llama.cpp CVEsYou are reading CVE-2026-137057. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
- Issue Trackinghttps://github.com/ggml-org/llama.cpp/issues/32550
- Patchhttps://github.com/ggml-org/llama.cpp/pull/32551
- Patchhttps://github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdcc815e5
- Referencehttps://github.com/ggml-org/llama.cpp/blob/b12603/src/llama-grammar.cpp#L519-L522
- Referencehttps://github.com/ggml-org/llama.cpp/releases/tag/b12604
- Referencehttps://www.vulncheck.com/advisories/llama-cpp-b7118-before-b12604-integer-underflow-in-grammar-parser-parse-sequence
Data last checked: Nov 30, 2026 04:06 UTC