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

Published Updated

Remote attackers can send crafted grammar trigger types to llama-server due to improper input validation.

CVSS score

Medium

6.9/10

CVSS 4.0 · Scored by VulDB Breakdown
Exploited in the wild
Not known
Not in CISA's KEV catalogue
Exploit code
None known
No public exploit found
Fix
None listed
No fixed version published
Attack path
Over the internet
No login, no user action

What is CVE-2026-134540?

CVE-2026-134540 is a medium-severity other vulnerability in ggml-org llama.cpp, published on 21 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-20

How severe is CVE-2026-134540?

CVE-2026-134540 scores 6.9 out of 10 under CVSS 4.0, which is medium severity. It was scored by VulDB.

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
None
Confidentiality
None
Integrity
None
Availability
Low

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

Which versions are affected by CVE-2026-134540?

It affects 1 product.

An affected version is exposed as installed. No special setting or call is needed.

Products include Ggml-Org Llama.cpp.

CPE match criteria 1
CPE 2.3Versions
cpe:2.3:a:ggml-org:llama.cpp:*:*:*:*:*:*:*:*from 0.7.0-dev, up to 0.7.0-dev

How do I fix CVE-2026-134540?

No fix has been published for CVE-2026-134540 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. More about Other.

Is CVE-2026-134540 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-134540 exists.

Sources

Also known as DEBIAN-CVE-2026-134540, GHSA-3c6w-v5cw-pq7q, UBUNTU-CVE-2026-134540.

Is CVE-2026-134540 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free