CVE-2026-134540
ggml-org llama.cpp llama-server sampling.cpp common_sampler_init input validation
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.
Fixes and workarounds
Fix
The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.
Source: CNA: VulDBFix
The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.
Source: CNA: VulDBFix
The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.
Source: CNA: VulDBAffected products and versions
| Product | Versions | Authority |
|---|---|---|
| llama.cpp ggml-org |
0.7.0-dev (affected) b12405 (unaffected) |
CNA: VulDB |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 4.0 / 6.9 medium |
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 | CNA: VulDB |
| 3.1 / 5.3 medium |
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C | CNA: VulDB |
| 3.0 / 5.3 medium |
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C | CNA: VulDB |
| 2.0 / 5.0 medium |
AV:N/AC:L/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C | CNA: VulDB |
| 4.0 / 5.5 medium |
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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X | NVD: [email protected] |
| 3.1 / 5.3 medium |
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L | NVD: [email protected] |
| 2.0 / 5.0 medium |
AV:N/AC:L/Au:N/C:N/I:N/A:P | NVD: [email protected] |
Exploit evidence
References
- https://vuldb.com/vuln/441681CNA: VulDB · vdb-entry, technical-description
- https://vuldb.com/vuln/441681/ctiCNA: VulDB · signature, permissions-required
- https://vuldb.com/cve/CVE-2026-134540CNA: VulDB · third-party-advisory
- https://vuldb.com/submit/1052496CNA: VulDB · third-party-advisory
- https://github.com/ggml-org/llama.cpp/issues/30835CNA: VulDB · issue-tracking
- https://github.com/ggml-org/llama.cpp/pull/31478CNA: VulDB · issue-tracking, patch
- https://gist.github.com/Yunzez/90b17f91d7f1955805e0045a1a76fb6d#file-repro_llamacpp_grammar_triggers_abort-pyCNA: VulDB · exploit
- https://github.com/ggml-org/llama.cpp/commit/9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22dCNA: VulDB · patch
- https://github.com/ggml-org/llama.cpp/releases/tag/b12405CNA: VulDB · patch
- https://github.com/ggml-org/llama.cpp/CNA: VulDB · product
- https://gist.github.com/Yunzez/90b17f91d7f1955805e0045a1a76fb6d#file-repro_llamacpp_grammar_triggers_abort-py[email protected]
- https://github.com/ggml-org/llama.cpp/[email protected]
- https://github.com/ggml-org/llama.cpp/commit/9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22d[email protected]
- https://github.com/ggml-org/llama.cpp/issues/30835[email protected]
- https://github.com/ggml-org/llama.cpp/pull/31478[email protected]
- https://github.com/ggml-org/llama.cpp/releases/tag/b12405[email protected]
- https://vuldb.com/cve/CVE-2026-134540[email protected]
- https://vuldb.com/submit/1052496[email protected]
- https://vuldb.com/vuln/441681[email protected]
- https://vuldb.com/vuln/441681/cti[email protected]
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.