Nuclio Shell Runtime Command Injection Leading to Privilege Escalation
Date: 2026-03
Affected: go/github.com/nuclio/nuclio
Attack vector: command-injection
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2026-29042
CWE: CWE-75

## Summary This vulnerability exists in Nuclio's Shell Runtime component, allowing attackers with function invocation permissions to inject malicious commands via HTTP request headers, execute arbitrary code with root privileges in function containers, steal ServiceAccount Tokens with cluster-admin level permissions, and ultimately achieve complete control over the entire Kubernetes cluster. Recommended CWE classification: CWE-78 (OS Command Injection). Nuclio Shell Runtime processes the `X-Nuclio-Arguments` HTTP header without validation or escaping, directly concatenating user input into shell commands executed via `sh -c`. This allows arbitrary command injection, enabling attackers to read sensitive files (including ServiceAccount tokens) and access the Kubernetes API with cluster-level privileges. ## Details ### Vulnerability Description The Nuclio Shell Runtime component contains a critical command injection vulnerability in how it processes user-supplied arguments. When a function is invoked via HTTP, the runtime reads the `X-Nuclio-Arguments` header and directly incorporates its value into shell commands without any validation or sanitization. ### Root Cause Analysis **Vulnerable Code Location 1:** `pkg/processor/runtime/shell/runtime.go:289-297` ```go func (s *shell) getCommandArguments(event nuclio.Event) []string { arguments := event.GetHeaderString(headers.Arguments) if arguments == "" { arguments = s.configuration.Arguments } retu


Mitigations:

Architectural layers (MAESTRO):