CVE-2026-134540ggml-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.
What to do
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | llama.cpp | Fix pending | UBUNTU-CVE-2026-134540 | |
| Ubuntu 26.04 | llama.cpp | Under investigation | UBUNTU-CVE-2026-134540 | |
| Debian 14 | llama.cpp | Fix pending | DEBIAN-CVE-2026-134540 |
What the vendor says
As published in the CVE record by VulDB, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- ggml-org llama.cpp: affected: 0.7.0-dev, b12405 not affected
Vendor advisories:
- https://github.com/ggml-org/llama.cpp/pull/31478 (patch)
- https://github.com/ggml-org/llama.cpp/commit/9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22d (patch)
- https://github.com/ggml-org/llama.cpp/releases/tag/b12405 (patch)
References
- https://vuldb.com/vuln/441681
- https://vuldb.com/vuln/441681/cti
- https://vuldb.com/cve/CVE-2026-134540
- https://vuldb.com/submit/1052496
- https://github.com/ggml-org/llama.cpp/issues/30835
- https://github.com/ggml-org/llama.cpp/pull/31478
- https://gist.github.com/Yunzez/90b17f91d7f1955805e0045a1a76fb6d#file-repro_llamacpp_grammar_triggers_abort-py
- https://github.com/ggml-org/llama.cpp/commit/9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22d
- https://github.com/ggml-org/llama.cpp/releases/tag/b12405
- https://github.com/ggml-org/llama.cpp/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.