Arbitrary Code Execution in OpenClaw by Environment Variable Manipulation
CVE-2026-41336
8.5HIGH
What is CVE-2026-41336?
The vulnerability in OpenClaw versions prior to 2026.3.31 allows malicious users to manipulate workspace .env files, overriding the OPENCLAW_BUNDLED_HOOKS_DIR environment variable. This can lead to the execution of arbitrary code by loading untrusted hook code, thereby replacing the secure default hooks with those controlled by an attacker. This poses a significant security risk, compromising the integrity of the system.
Affected Version(s)
OpenClaw 0 < 2026.3.31
OpenClaw 2026.3.31
