What is CVE-2026-137057?
CVE-2026-137057 is a high-severity integer overflow vulnerability in ggml-org llama.cpp, published on 25 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-191
How severe is CVE-2026-137057?
CVE-2026-137057 scores 8.7 out of 10 under CVSS 4.0, which is high severity. It was scored by VulnCheck.
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- None
- User interaction
- None
- Confidentiality
- None
- Integrity
- None
- Availability
- 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:N
Which versions are affected by CVE-2026-137057?
1 open source package ship an affected version, including ggml-org/llama.cpp.
An affected version is exposed as installed. No special setting or call is needed.
| Package | Affected | Fixed in |
|---|---|---|
ggml-org/llama.cpp GitHubpkg:github/ggml-org/llama.cpp | From b7118 | b12604 |
How do I fix CVE-2026-137057?
Upgrade ggml-org/llama.cpp to b12604 or later.
Upgrade to the fixed version. Check arithmetic on sizes and lengths before using the result. More about Integer overflow.
Is CVE-2026-137057 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-137057 exists.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-f86p-wv5j-r5vj, UBUNTU-CVE-2026-137057.