Junglewise Threat Intelligence

CVE-2026-41336: OpenClaw workspace .env hook root override

CVE-2026-41336 · Severity: low · CVSS 3.1 · Published 2026-04-02

Technologies: Openclaw. Vendors: Openclaw.

Executive brief

OpenClaw is an AI automation platform that executes tasks on various operating systems and platforms. A vulnerability in versions up to 2026.3.28 allows an untrusted workspace configuration file (.env) to override the location where OpenClaw loads its bundled security hooks. An attacker can exploit this by placing malicious hook code in a workspace and tricking a user into running OpenClaw in that workspace, enabling arbitrary code execution on the user's system.

Technical details

The vulnerability is a path traversal / untrusted configuration override issue (CWE-829) in OpenClaw's hook loading mechanism. Prior to v2026.3.31, the application permitted workspace-level .env files to set or override the OPENCLAW_BUNDLED_HOOKS_DIR environment variable, which controls the root directory from which bundled hooks are loaded. Bundled hooks are security-critical code that execute by default with elevated privileges. An attacker who can influence or control a workspace configuration (e.g., via a malicious git repository or shared project directory) can set OPENCLAW_BUNDLED_HOOKS_DIR to point to attacker-controlled paths, causing OpenClaw to load arbitrary malicious hooks instead of the trusted defaults. The attack requires user interaction (opening the workspace) but no additional privileges. The fix (commit 330a9f98cb29c79b1c16a2117e03d6276a0d6289) blocks workspace .env from overriding this critical configuration variable, preserving the integrity of bundled hooks. Patched version 2026.3.31 and later prevent this override.

Affected products

  • OpenClaw openclaw <2026.3.31

Timeline

  • 2026-04-02: disclosed: GHSA-3qpv-xf3v-mm45 published
  • 2026-03-31: patched: Fix commit 330a9f98cb29c79b1c16a2117e03d6276a0d6289 merged
  • 2026-03-31: other: Patched version v2026.3.31 released

References

Related threats