# CVE-2026-134540: ggml-org llama.cpp llama-server sampling.cpp common_sampler_init input validation

- Severity: Medium 6.9 (CVSS:4.0, scored by VulDB) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.85%, higher than 59% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-11-21T23:00:23.320Z
- Modified: 2026-11-23T16:17:32.240Z
- Weaknesses: CWE-20
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: VulDB

## 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.

(As written by CVE List.)

## Affected

- ggml-org llama.cpp: 0.7.0-dev (not affected: b12405)

## Every score

- VulDB: CVSS: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`
- VulDB: CVSS: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`
- VulDB: CVSS: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`
- VulDB: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C`

## References

- <https://gist.github.com/Yunzez/90b17f91d7f1955805e0045a1a76fb6d#file-repro_llamacpp_grammar_triggers_abort-py> (exploit)
- <https://vuldb.com/vuln/441681> (technical-description, vdb-entry)
- <https://vuldb.com/vuln/441681/cti> (permissions-required, signature)
- <https://vuldb.com/cve/CVE-2026-134540> (third-party-advisory)
- <https://vuldb.com/submit/1052496> (third-party-advisory)
- <https://github.com/ggml-org/llama.cpp/issues/30835> (issue-tracking)
- <https://github.com/ggml-org/llama.cpp/pull/31478> (issue-tracking, patch)
- <https://github.com/ggml-org/llama.cpp/commit/9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22d> (patch)
- <https://github.com/ggml-org/llama.cpp/releases/tag/b12405> (patch)
- <https://github.com/ggml-org/llama.cpp/> (product)

## Sources

- CVE List: [CVE-2026-134540](https://www.cve.org/CVERecord?id=CVE-2026-134540), CVE Terms of Use, modified 2026-11-23
- NVD: [CVE-2026-134540](https://nvd.nist.gov/vuln/detail/CVE-2026-134540), Public domain, modified 2026-11-23

---

Page: https://cve.day/CVE-2026-134540 · Whole record: https://cve.day/CVE-2026-134540.json · Rebuilt by cve.day 2026-11-25T22:59:52.571Z
