The vulnerability lies in the improper handling of environment variable overrides for commands executed on the host. The system allowed users to override sensitive environment variables such as HTTPS_PROXY, NODE_TLS_REJECT_UNAUTHORIZED, and DOCKER_HOST. This could allow an attacker to redirect network traffic to a malicious server, disable TLS certificate validation, or take control of the Docker daemon, leading to information disclosure or remote code execution.
The patch addresses this by introducing a blocklist of sensitive environment variable keys that should not be overridden by users. The core logic change is in the sanitizeHostExecEnv function, which now distinguishes between trusted, inherited environment variables and user-provided overrides, discarding any dangerous overrides. This fix is then propagated to higher-level functions like applySkillEnvOverrides (for agent skills) and the execute method of the command execution tool, which are the primary entry points for this vulnerability.