ggml-org llama.cpp llama-server sampling.cpp common_sampler_init input validation
- State
- Published
- Severity
- 6.9 Medium
- Published
- Nov 21, 2026
- Updated
- Nov 23, 2026
- Reserved
- Nov 21, 2026
Description
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.
| Product | Versions |
|---|---|
| llama.cpp ggml-org | 0.7.0-dev Affectedb12405 Not Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 6.9 Medium | VulDB | |
| 3.1 | 5.3 Medium | VulDB | |
| 3.0 | 5.3 Medium | VulDB | |
| 2.0 | 5.0 Medium | VulDB |
Weaknesses
- CWE-20 Improper Input Validation
References
- VDB-441681 | ggml-org llama.cpp llama-server sampling.cpp common_sampler_init input validationVulnerability DatabaseTechnical Details
- VDB-441681 | CTI Indicators (IOB, IOC, IOA)Detection RuleSign-In Required
- CVE-2026-134540 | CVE Analysis and ReportThird-Party Advisory
- Submit #1052496 | ggml-org llama.cpp (llama-server) 0.7.0-dev, build 50 Denial of ServiceThird-Party Advisory
- https://github.com/ggml-org/llama.cpp/issues/30835Issue Tracker
- https://github.com/ggml-org/llama.cpp/pull/31478Issue TrackerPatch
- https://gist.github.com/Yunzez/90b17f91d7f1955805e0045a1a76fb6d#file-repro_llamacpp_grammar_triggers_abort-pyExploit
- https://github.com/ggml-org/llama.cpp/commit/9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22dPatch
- https://github.com/ggml-org/llama.cpp/releases/tag/b12405Patch
- https://github.com/ggml-org/llama.cpp/Product Page
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.