CVE-2026-29042 Overview
CVE-2026-29042 is a command injection vulnerability affecting the Nuclio serverless framework, specifically within its Shell Runtime component. Nuclio is a high-performance serverless framework designed for real-time events and data processing. Prior to version 1.15.20, the Nuclio Shell Runtime component contains a critical flaw 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, enabling attackers to inject and execute arbitrary operating system commands.
Critical Impact
Unauthenticated attackers can achieve remote code execution on serverless function hosts by injecting malicious shell commands through the X-Nuclio-Arguments HTTP header.
Affected Products
- Iguazio Nuclio versions prior to 1.15.20
Discovery Timeline
- 2026-03-06 - CVE CVE-2026-29042 published to NVD
- 2026-03-10 - Last updated in NVD database
Technical Details for CVE-2026-29042
Vulnerability Analysis
This command injection vulnerability exists because the Nuclio Shell Runtime directly passes user-controlled input from the X-Nuclio-Arguments HTTP header into shell command execution without proper sanitization. The vulnerable code path uses Go's exec.CommandContext function with sh -c, which invokes a shell interpreter to execute commands. When user-supplied arguments are concatenated into a single string and passed to sh -c, shell metacharacters (such as ;, |, &, $(), and backticks) are interpreted by the shell, allowing attackers to break out of the intended command context and execute arbitrary commands.
The vulnerability is network-accessible without requiring authentication, as the attack only requires the ability to send HTTP requests to a Nuclio function endpoint with a crafted X-Nuclio-Arguments header. Successful exploitation grants the attacker the ability to execute commands with the privileges of the Nuclio runtime process, potentially leading to complete compromise of the serverless function environment, data exfiltration, lateral movement, or denial of service.
Root Cause
The root cause is the unsafe use of sh -c with user-controlled input in the shell runtime component. The original implementation joined user-supplied arguments into a single string and passed them to exec.CommandContext(context, "sh", "-c", strings.Join(command, " ")). This pattern is inherently dangerous because the shell interprets metacharacters in the concatenated string, allowing command injection when any part of the input is attacker-controlled.
Attack Vector
An attacker can exploit this vulnerability by sending an HTTP request to a Nuclio function endpoint with a malicious X-Nuclio-Arguments header. The header value can contain shell metacharacters that escape the intended command context and inject arbitrary commands. For example, an attacker could append ; malicious_command or use command substitution syntax like $(malicious_command) to execute additional commands on the target system.
The security patch addresses this by switching from sh -c execution to direct command execution using Go's exec.CommandContext with separate argument passing, which prevents shell metacharacter interpretation:
if s.commandInPath {
- // if the command is an executable, run it as a command with sh -c.
- cmd = exec.CommandContext(context, "sh", "-c", strings.Join(command, " "))
+ // Run the command directly without sh -c to prevent shell metacharacter
+ // interpretation in user-supplied arguments (CVE-2026-29042).
+ // Go's exec resolves the command via LookPath internally.
+ cmd = exec.CommandContext(context, command[0], command[1:]...)
} else {
// if the command is a shell script run it with sh(without -c). this will make sh
Source: GitHub Commit Changes
Detection Methods for CVE-2026-29042
Indicators of Compromise
- HTTP requests to Nuclio function endpoints containing shell metacharacters (;, |, &, $(), backticks) in the X-Nuclio-Arguments header
- Unexpected child processes spawned by the Nuclio runtime process
- Anomalous network connections or file system modifications originating from serverless function containers
- Log entries showing unusual command execution patterns or error messages related to shell command failures
Detection Strategies
- Implement web application firewall (WAF) rules to detect and block requests containing shell metacharacters in HTTP headers
- Monitor Nuclio runtime logs for suspicious argument patterns in function invocations
- Deploy runtime security monitoring to detect unexpected process execution within serverless function containers
- Use network monitoring to identify command-and-control traffic or data exfiltration attempts from Nuclio environments
Monitoring Recommendations
- Enable detailed logging for all HTTP requests to Nuclio function endpoints, including header values
- Implement behavioral analysis to detect anomalous process creation within Nuclio runtime containers
- Set up alerts for any outbound network connections from serverless functions that don't match expected patterns
- Monitor for file system changes in function execution environments that could indicate post-exploitation activity
How to Mitigate CVE-2026-29042
Immediate Actions Required
- Upgrade Nuclio to version 1.15.20 or later immediately
- Audit logs for any previous exploitation attempts by searching for shell metacharacters in X-Nuclio-Arguments headers
- Implement network segmentation to limit the blast radius of potential compromise
- Review and restrict permissions of Nuclio runtime processes following the principle of least privilege
Patch Information
The vulnerability has been patched in Nuclio version 1.15.20. The fix modifies the shell runtime to execute commands directly without invoking a shell interpreter, preventing shell metacharacter injection. Users should upgrade to this version or later as soon as possible. Detailed information about the patch is available in the GitHub Security Advisory GHSA-95fj-3w7g-4r27 and the GitHub Pull Request Discussion.
Workarounds
- If immediate upgrade is not possible, consider disabling the shell runtime and using alternative runtimes (Python, Go, Node.js) that are not affected by this vulnerability
- Implement a reverse proxy or WAF in front of Nuclio to filter and reject requests containing shell metacharacters in headers
- Restrict network access to Nuclio function endpoints to trusted sources only
- Consider temporarily taking vulnerable functions offline until the patch can be applied
# Upgrade Nuclio to patched version
# Using nuclio CLI
nuctl version
# Verify version is 1.15.20 or later
# If using Helm for Kubernetes deployment
helm repo update
helm upgrade nuclio nuclio/nuclio --version 1.15.20
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

