Home › CVE › Vulnerabilities
CVE-2026-137057 — ggml-org llama.cpp
Research article
llama.cpp Integer Underflow Vulnerability in Grammar Parser
| CVE | CVE-2026-137057 |
|---|---|
| Vendor and product | ggml-org llama.cpp |
| Published | November 25, 2026 22:45 UTC |
| Research cut-off | November 25, 2026 22:15 UTC |
| Sources reviewed | 2: NVD record (last modified 2026-11-25); CISA KEV catalog |
Executive summary
The CVE-2026-137057 vulnerability impacts the llama.cpp project, as an integer underflow issue in the grammar parser enables unauthenticated remote attackers to trigger a denial of service [1]. The CVSS 3.1 score is 7.5 HIGH, scored by disclosure@vulncheck.com [1]. The vulnerability impacts versions from b7118 up to but not including b12604 [1]. The reviewed sources do not report exploitation [2]. The main action is to update to the fixed version.
Key points
- CVE-2026-137057 affects versions of llama.cpp from b7118 up to but not including b12604 [1].
- An integer underflow flaw in the grammar parser allows denial of service [1].
- The CVSS 3.1 score is 7.5 HIGH, scored by disclosure@vulncheck.com [1].
- The reviewed sources do not report exploitation [2].
- The fixed version is b12604 [1].
Vulnerability identification
| CVE ID | Vendor | Product | CWE | CVSS 4.0 | CVSS 3.1 |
|---|---|---|---|---|---|
| CVE-2026-137057 | ggml-org | llama.cpp | CWE-191 | 8.7 HIGH (scored by disclosure@vulncheck.com) | 7.5 HIGH (scored by disclosure@vulncheck.com) |
| Published | Last Modified | Record Status | |||
| 2026-11-25T20:18:39 | 2026-11-25T20:18:39 | Awaiting Analysis |
Vulnerability description
A flaw in the grammar parsing function of llama.cpp versions from b7118 up to but not including b12604 allows attackers to trigger denial of service by sending specific grammar inputs [1]. This vulnerability exploits an integer underflow in the llamagrammarparser::parsesequence() function, which can lead to memory exhaustion and process hang [1].
Attack surface and exploitation prerequisites
The CVSS 3.1 vector for this vulnerability indicates that it can be exploited remotely without requiring user interaction or elevated privileges. The attack is network-based and has a high impact on availability [1].
Impact analysis
The vulnerability primarily affects system availability, as attackers can cause memory exhaustion and process hang. The CVSS 3.1 score reflects this high impact on availability, with no effect on confidentiality or integrity [1].
Affected products and versions
| Affected Version | Fixed Version |
|---|---|
| ≥ b7118, < b12604 | b12604 |
Exploitation and threat intelligence status
CVE-2026-137057 is not included in the CISA KEV catalog as of 2026-11-25. This absence does not confirm or deny whether the vulnerability has been exploited [2]. The reviewed sources do not report any exploitation [2].
Detection and exposure assessment
Users should check if their installed version of llama.cpp falls within the affected range: ≥ b7118 and < b12604 [1]. This can help determine if the system is vulnerable to this issue.
Remediation
The recommended fix is to upgrade to the version b12604, which resolves the integer underflow flaw [1]. Organizations should ensure they are using this version to mitigate the risk of denial of service attacks.
Remediation checklist
Evidence gaps
- The sources do not describe the affected component's internals.
- The sources do not mention a workaround.
- The sources do not describe the attack lifecycle or scenarios.
- The sources do not provide indicators of compromise.
- The sources do not give detection steps beyond version checking.
References
- CVE-2026-137057 record. NIST National Vulnerability Database (NVD), 2026-11-25. https://nvd.nist.gov/vuln/detail/CVE-2026-137057. Accessed 2026-11-25.
- Known Exploited Vulnerabilities Catalog. Cybersecurity and Infrastructure Security Agency (CISA), 2026-11-25. https://www.cisa.gov/known-exploited-vulnerabilities-catalog. Accessed 2026-11-25.
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.
Severity breakdown
High · 8.7
An attacker without an account can exploit this over the network, without any user action.
- Attack from
- the network (remotely)
- Attack complexity
- low (no special conditions)
- Special conditions
- none
- Login needed
- no
- User action needed
- no
- Impact
- high on availability, none on confidentiality and integrity
- Impact on other systems
- none
Weakness
- CWE-191: Integer Underflow (Wrap or Wraparound)
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| ggml-org llama.cpp | ≥ b7118, < b12604 | b12604 |
References by type
Patches and fixed releases
- github.com/ggml-org/llama.cpp/commit/46eb1742db6d2caec1bfa848c5702b1bdc…
- github.com/ggml-org/llama.cpp/pull/32551
- github.com/ggml-org/llama.cpp/releases/tag/b12604
Other references
Affected
- ggml-org llama.cpp
Frequently asked questions
What is CVE-2026-137057?
The CVE-2026-137057 vulnerability impacts the llama.cpp project, as an integer underflow issue in the grammar parser enables unauthenticated remote attackers to trigger a denial of service. The CVSS 3.1 score is 7.5 HIGH, scored by disclosure@vulncheck.com. The vulnerability impacts versions from b7118 up to but not including b12604. The reviewed sources do not report exploitation. Weakness type: Integer Underflow (Wrap or Wraparound) (CWE-191).
How severe is CVE-2026-137057?
CVE-2026-137057 has a CVSS 4.0 base score of 8.7 (high), from the CNA (vulncheck.com). An attacker without an account can exploit this over the network, without any user action.
Is CVE-2026-137057 being exploited?
Not as far as is known: CVE-2026-137057 is not in CISA's Known Exploited Vulnerabilities catalog as of November 26, 2026. EPSS estimates a 1.3% chance that it is exploited in the next 30 days.
Which versions are affected by CVE-2026-137057?
ggml-org llama.cpp ≥ b7118, < b12604 (fixed in b12604).
How do I fix CVE-2026-137057?
Upgrade to the fixed version of llama.cpp, b12604. Verify that the installed version is not within the affected range: ≥ b7118 and < b12604. Monitor for signs of memory exhaustion or process hang, as general guidance.