CVE-2026-34940 KubeAI: OS Command Injection via Model URL in Ollama Engine startup probe allows arbitrary command execution in model pods

High 8.7 Published Updated

Attackers can execute arbitrary shell commands in model pods by injecting malicious URLs into KubeAI Model resources.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-34940?

CVE-2026-34940 is a high-severity command injection vulnerability in kubeai-project kubeai, published on 6 Apr 2026. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

KubeAI is an AI inference operator for kubernetes. Prior to 0.23.2, the ollamaStartupProbeScript() function in internal/modelcontroller/engine_ollama.go constructs a shell command string using fmt.Sprintf with unsanitized model URL components (ref, modelParam). This shell command is executed via bash -c as a Kubernetes startup probe. An attacker who can create or update Model custom resources can inject arbitrary shell commands that execute inside model server pods. This vulnerability is fixed in 0.23.2.

Weakness: CWE-78

Which versions are affected by CVE-2026-34940?

3 open source packages ship an affected version, including github.com/kubeai-project/kubeai. It affects 1 product.

PackageAffectedFixed in
github.com/kubeai-project/kubeai GoAll versions0.23.2
github.com/kubeai-project/kubeai GoAll versions0.23.2
github.com/kubeai-project/kubeai GoAll versions0.23.2

Products include Kubeai Kubeai.

How do I fix CVE-2026-34940?

Upgrade github.com/kubeai-project/kubeai to 0.23.2 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-34940 being exploited?

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

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-324q-cwx9-7crr, GO-2026-4920.

Is CVE-2026-34940 in your software?

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

Check your SBOMs for free