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

Status: published. Published: 2026-11-21. Updated: 2026-11-23.

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.

## Remediation

- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: VulDB) — https://github.com/ggml-org/llama.cpp/pull/31478
- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: VulDB) — https://github.com/ggml-org/llama.cpp/commit/9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22d
- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: VulDB) — https://github.com/ggml-org/llama.cpp/releases/tag/b12405

## Affected products and versions

- ggml-org / llama.cpp: 0.7.0-dev (affected); b12405 (unaffected). Source: CNA: VulDB

## Severity and prioritization

- 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; source: CNA: 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; source: CNA: 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; source: CNA: VulDB

- CVSS 2.0: 5 (medium); AV:N/AC:L/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C; source: CNA: VulDB

- CVSS 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; source: NVD: cna@vuldb.com

- 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; source: NVD: cna@vuldb.com

- CVSS 2.0: 5 (medium); AV:N/AC:L/Au:N/C:N/I:N/A:P; source: NVD: cna@vuldb.com

- CISA KEV: No listing in collected sources

- EPSS: 0.65% as of 2026-11-23; percentile 52.03%

- SSVC: exploitation poc; automatable yes; technical impact partial; source ADP: CISA-ADP

- Weaknesses: CWE-20

## Exploit evidence

- exploit: https://gist.github.com/Yunzez/90b17f91d7f1955805e0045a1a76fb6d#file-repro_llamacpp_grammar_triggers_abort-py (CNA: VulDB)

## References

- https://vuldb.com/vuln/441681 (CNA: VulDB; vdb-entry, technical-description)

- https://vuldb.com/vuln/441681/cti (CNA: VulDB; signature, permissions-required)

- https://vuldb.com/cve/CVE-2026-134540 (CNA: VulDB; third-party-advisory)

- https://vuldb.com/submit/1052496 (CNA: VulDB; third-party-advisory)

- https://github.com/ggml-org/llama.cpp/issues/30835 (CNA: VulDB; issue-tracking)

- https://github.com/ggml-org/llama.cpp/pull/31478 (CNA: VulDB; issue-tracking, patch)

- https://gist.github.com/Yunzez/90b17f91d7f1955805e0045a1a76fb6d#file-repro_llamacpp_grammar_triggers_abort-py (CNA: VulDB; exploit)

- https://github.com/ggml-org/llama.cpp/commit/9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22d (CNA: VulDB; patch)

- https://github.com/ggml-org/llama.cpp/releases/tag/b12405 (CNA: 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 (cna@vuldb.com)

- https://github.com/ggml-org/llama.cpp/ (cna@vuldb.com)

- https://github.com/ggml-org/llama.cpp/commit/9f26fe11c73c7e74a5e99e7f1b6370ad8e1cb22d (cna@vuldb.com)

- https://github.com/ggml-org/llama.cpp/issues/30835 (cna@vuldb.com)

- https://github.com/ggml-org/llama.cpp/pull/31478 (cna@vuldb.com)

- https://github.com/ggml-org/llama.cpp/releases/tag/b12405 (cna@vuldb.com)

- https://vuldb.com/cve/CVE-2026-134540 (cna@vuldb.com)

- https://vuldb.com/submit/1052496 (cna@vuldb.com)

- https://vuldb.com/vuln/441681 (cna@vuldb.com)

- https://vuldb.com/vuln/441681/cti (cna@vuldb.com)

## Provenance

- CNA: VulDB: https://www.cve.org/CVERecord?id=CVE-2026-134540; retrieved 2026-11-23; source updated 2026-11-23

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-134540; retrieved 2026-11-22; source updated 2026-11-21

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-134540; retrieved 2026-11-23; source updated Not reported

Revision: c58d1e9e21d3c29a7f1c015664b7bd83151fb971b844d6dce0bef82b9768f187

Canonical: https://y2.dev/cve/CVE-2026-134540

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.