The vulnerability in OpenClaw stems from an incomplete denylist for environment variables that are passed to child processes. An attacker could provide specially crafted environment variables (like VIMINIT, EXINIT, LUA_INIT, HOSTALIASES) that would not be filtered by the old sanitization logic. These variables could then be interpreted by other programs called during execution, leading to arbitrary code execution or other malicious behavior.
The patch addresses this by expanding the denylist of dangerous environment variables and introducing a new, stricter sanitization function, isDangerousHostInheritedEnvVarName. The vulnerable functions identified were all using the previous, less secure check (isDangerousHostEnvVarName or isBlocked) and were updated to use the new, more comprehensive one. Any runtime profile of an exploit would show one of these sanitization functions failing to remove the malicious environment variable before process execution.