The vulnerability allows an attacker to control the Python runtime used by the gcloud command-line tool by setting the CLOUDSDK_PYTHON environment variable in a workspace's .env file. This is a form of untrusted search path vulnerability (CWE-426). The root cause is insufficient filtering of environment variables loaded from .env files before they are passed to subprocesses. The analysis of the patch identified the toMcpEnvRecord function in src/agents/mcp-config-shared.ts as the key vulnerable function. This function is responsible for creating the environment variable record for subprocesses. The patch modifies this function to use a more stringent filtering logic, isDangerousMcpStdioEnvVarName, which is designed to block dangerous environment variables like CLOUDSDK_PYTHON. The test changes in the same commit confirm the intent to block more environment variables that can affect toolchain execution.