Executive brief
OpenClaw is a development tool that manages workspace configuration and dependencies. A malicious .env file in a workspace could inject environment variables that control critical OpenClaw runtime behavior, such as update sources, gateway URLs, and browser executable paths, potentially allowing an attacker to hijack tool behavior and redirect operations to malicious infrastructure.
Technical details
This vulnerability is an environment variable injection issue (CWE-15) in OpenClaw's .env file parsing. The root cause is insufficient validation of environment variable names loaded from workspace .env files, allowing an attacker to set reserved OpenClaw runtime-control variables. An attacker with write access to a workspace .env file (e.g., via a malicious repository) can inject variables affecting update sources, gateway URLs, ClawHub resolution, and browser executable paths. The attack requires local file system access but no special privileges. The fix, released in version 2026.4.9, explicitly blocks OpenClaw runtime-control keys and key families from being loaded from workspace .env files.
Affected products
- OpenClaw OpenClaw < 2026.4.9
Timeline
- 2026-04-17: disclosed
- 2026-04-17: patched: Fix released in version 2026.4.9
- 2026-05-05: other: CVE-2026-43531 assigned