CVE-2026-134452 in Dockhand
Summary
by MITRE • 11/21/2026
Dockhand before 1.0.57 merges stack secret environment variables into the environment used to spawn docker compose during stack deploys without filtering reserved keys such as PATH. An authenticated attacker with stacks:edit permission can set PATH to a directory containing a malicious binary and trigger a deploy, executing arbitrary commands as the Dockhand server process user.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Analysis
by VulDB Data Team • 11/21/2026
The vulnerability identified in Dockhand versions prior to 1.0.57 represents a critical environment variable injection flaw that allows for remote code execution under specific authentication conditions. This issue stems from an insecure handling of stack secret environment variables during the deployment lifecycle. When a user initiates a stack deploy, the application merges provided secret environment variables directly into the system environment used to spawn the docker compose process. Crucially, this merging operation lacks proper validation or filtering for reserved and sensitive keys such as PATH, LD_LIBRARY_PATH, or other shell-specific configuration variables that influence how executables are located and loaded by the operating system.
An authenticated attacker possessing stacks:edit permissions can exploit this flaw by manipulating these environment variables during the deployment process. By setting the PATH variable to a directory containing a malicious binary crafted by the attacker, they effectively alter the execution context of subsequent commands run by docker compose. When the deploy operation proceeds, the shell or command interpreter invoked by dockhand searches for executables in the directories listed in the modified PATH environment variable before checking standard system locations. If the attacker places a trojanized version of a common utility, such as ls, cp, or even docker itself, within their controlled directory, that malicious binary will be executed instead of the legitimate one with the privileges of the Dockhand server process user.
The operational impact of this vulnerability is severe, resulting in arbitrary command execution on the host system running the Dockhand service. Since the dockhand server typically runs with elevated permissions to manage Docker containers and stacks, successful exploitation grants an attacker full control over the underlying infrastructure. This can lead to complete compromise of the containerized environment, potential lateral movement within the network, data exfiltration, or establishment of persistent backdoors. The attack vector is relatively straightforward for any user with edit access to a stack configuration, making it particularly dangerous in multi-tenant environments where users may have limited trust relationships but sufficient permissions to trigger deployments.
From a classification perspective, this vulnerability aligns with CWE-94 Improper Control of Generation of Code Command Injection and CWE-78 OS Command Injection via Environment Variables. It also maps to the MITRE ATT&CK technique T1059 Command and Scripting Interpreter, specifically through environment variable manipulation as described in sub-techniques related to command line interface abuse or script execution contexts. The flaw highlights a common pitfall in web applications that interact with system-level tools: failing to sanitize inputs that directly influence the runtime environment of external processes.
Mitigation for this vulnerability requires an immediate upgrade to Dockhand version 1.0.57 or later, where the developers have implemented proper filtering mechanisms to prevent reserved keys from being merged into the execution environment. In addition to upgrading, administrators should enforce strict least-privilege principles regarding stack permissions and consider implementing additional sandboxing measures for docker compose executions. Regular auditing of deployed stacks and monitoring for unusual process spawns can also help detect exploitation attempts in environments where patching might be delayed.