llama.cpp CVE-2026-134540
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach exposed llama-server API
-
DeliverySend completion request with grammar_triggers
-
ExploitSet trigger.type to unknown value
-
Executioncommon_sampler_init hits GGML_ASSERT(false)
-
PersistProcess calls abort()
-
ImpactServer crashes, all sessions dropped (DoS)
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
|
| Exploitation Conditions | Requires a reachable llama-server instance whose completion/sampling API accepts client-supplied grammar trigger parameters, with grammar_triggers[].type controllable by the requester; supplying an unknown type value drives common_sampler_init into the GGML_ASSERT(false) path. Affected builds are llama.cpp 0.7.0-dev prior to release b12405. Per the CVSS vector it needs no authentication and no user interaction (PR:N/UI:N) and a single low-complexity network request (AV:N/AC:L/AT:N). Limiting factors: the server's API must be network-exposed to the attacker and must permit grammar/sampling trigger parameters in requests; the impact is a process crash/DoS only, with no code execution or data exposure. |
| Impact | This is a denial-of-service issue, not the 'Information Disclosure' its tag claims: the supplied commit diff shows an unreachable GGML_ASSERT(false, "unknown trigger type") - which calls abort() and terminates the process - being replaced by a thrown std::runtime_error, and the vendor CVSS 4.0 vector sets VC:N/VI:N/VA:L (availability-only, no confidentiality or integrity impact). Signals mostly agree on moderate priority: the CVSS 4.0 base is 5.5 (medium), the exploit maturity is E:P (proof-of-concept, not E:A active), there is no CISA KEV listing and no EPSS score supplied, and the vuln.today decision label is 'this_month' rather than act_now/emergency. The vector is remote and low-complexity with no privileges or user interaction (AV:N/AC:L/AT:N/PR:N/UI:N), so exposure is broad wherever the API is reachable, but the worst outcome is a crash. One genuine conflict: the vendor rates availability as VA:L, yet the mechanism (abort() of the sampler-init path inside llama-server) terminates the whole server process and drops all sessions, which is closer to a high availability impact - I assess VA:H/A:H below and flag the divergence. Net: a real, patch-this-month DoS against exposed llama-server instances, not a critical RCE and not an information-disclosure bug despite the tag. |
| Exploit ScenarioDerived | A remote attacker sends a crafted completion/sampling request to an exposed llama-server endpoint with grammar_triggers[].type set to an unrecognized value; common_sampler_init reaches the GGML_ASSERT(false) 'unknown trigger type' branch, which calls abort() and crashes the server process, dropping all in-flight requests (DoS). A public reproduction script is referenced in a GitHub gist (repro_llamacpp_grammar_triggers_abort.py); it is a PoC reference and is not verified here as a packaged working exploit, though the advisory states the exploit was disclosed publicly. The CVSS vector (AV:N/AC:L/PR:N/UI:N) makes this a single, low-complexity, unauthenticated request. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 21, 2026
Denial of service in llama.cpp 0.7.0-dev's llama-server component lets an unauthenticated remote client abort the server process by submitting an unrecognized grammar_triggers[].type value to the sampling/completion API. The input-validation failure in common_sampler_init (CWE-20) reaches GGML_ASSERT(false), so the process terminates rather than returning a controlled error, and builds before b12405 are affected. The CVE description states exploit code has been disclosed and a public gist reproduction script is referenced, but no CISA KEV entry is present and impact is availability-only with no code execution or data exposure.
RemediationAI
Vendor-released patch: b12405. Upgrade llama.cpp to release b12405 or later, which contains patch commit 9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22d; the vendor release is at https://github.com/ggml-org/llama.cpp/releases/tag/b12405 and the change is visible at https://github.com/ggml-org/llama.cpp/commit/9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22d. The supplied evidence identifies upgrading as the mitigation; because exploitation requires a reachable llama-server API that accepts client-controlled grammar trigger parameters, restricting network access to the API or preventing untrusted clients from supplying those parameters reduces exposure, but the evidence does not document a feature-level workaround. The vuln.today decision label is this_month, consistent with a DoS-only issue whose availability impact is scored VA:L in CVSS 4.0 and A:H in the independent CVSS 3.1 assessment.
Affected ProductsAI
llama.cpp 0.7.0-dev builds prior to release b12405 are affected, specifically the llama-server component handling client-supplied grammar trigger parameters. The fix is in release b12405 and patch commit 9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22d. Vendor references include the release at https://github.com/ggml-org/llama.cpp/releases/tag/b12405, the commit at https://github.com/ggml-org/llama.cpp/commit/9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22d, issue https://github.com/ggml-org/llama.cpp/issues/30835 and pull request https://github.com/ggml-org/llama.cpp/pull/31478; no CPE strings were supplied in the intelligence feed.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
llama.cpp is a C++ inference engine for large language models; llama-server exposes an HTTP API for completions and sampling, where clients can supply grammar trigger definitions. In common/sampling.cpp, common_sampler_init handled an unknown grammar_triggers[].type by hitting GGML_ASSERT(false) for an unknown trigger type, an assertion that calls abort and kills the server process; the patch replaces that assert with a thrown std::runtime_error carrying the unknown type. CWE-20 covers the missing validation of attacker-controlled input before the switch/assert path. The supplied CVSS 4.0 vector is AV:N/AC:L/AT:N/PR:N/UI:N with VC:N/VI:N/VA:L, and the independent assessment is CVSS 3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, both describing unauthenticated remote availability impact; no CPE strings were provided. The feed's Information Disclosure tag is not supported by the commit diff or the availability-only CVSS metrics.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P
Remote unauthenticated low-complexity request (AV:N/AC:L/PR:N/UI:N) drives an abort() that terminates the whole server process, so A:H; no confidentiality or integrity impact (C:N/I:N), diverging from the vendor's VA:L.
Primary rating from Vendor (vuldb).
CVSS VectorVendor: vuldb
DescriptionCVE.org
A security vulnerability has been detected in ggml-org llama.cpp 0.7.0-dev. This affects the function common_sampler_init of the file common/sampling.cpp of the component llama-server. Such manipulation of the argument grammar_triggers[].type leads to improper input validation. It is possible to launch the attack remotely. The exploit has been disclosed publicly and may be used. Upgrading to version b12405 mitigates this issue. The name of the patch is 9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22d. It is advisable to upgrade the affected component.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB