OpenClaw shell-env fallback trusted startup environment values and could execute attacker-influenced login-shell startup paths before loading env keys.
openclaw (npm)>= 2026.1.5 and <= 2026.2.21-2main: 9363c320d8ffe29290906752fab92621da02c3f72026.2.22The vulnerable chain was in the shell-env fallback path:
src/infra/shell-env.tsresolveShell(env) trusted env.SHELL when set.execLoginShellEnvZero(...) executed ${SHELL} -l -c "env -0" with inherited runtime env.src/config/io.tssrc/config/env-vars.ts / env policy coverageSHELL handling was hardened, but startup-path selectors (HOME, ZDOTDIR) still needed explicit blocking in config env ingestion and sanitization for shell fallback execution.With env/config influence, this could trigger unintended command execution in shell startup processing on the OpenClaw host process context.
Mainline hardening now:
- blocks SHELL, HOME, and ZDOTDIR during config env ingestion used by runtime fallback,
- sanitizes shell fallback execution env, pinning HOME to the real user home and dropping ZDOTDIR + dangerous startup vars,
- adds regression tests for config env ingestion and shell fallback/path-probe sanitization.
9363c320d8ffe29290906752fab92621da02c3f7SECURITY.md), this is not a public-remote issue and depends on crossing local trusted-operator boundaries.patched_versions is intentionally pre-set to the planned next release (2026.2.22) so once npm release is out, maintainers can publish advisory immediately.
OpenClaw thanks @tdjackey for reporting.
{
"github_reviewed_at": "2026-03-03T21:39:51Z",
"github_reviewed": true,
"cwe_ids": [
"CWE-15",
"CWE-78"
],
"nvd_published_at": null,
"severity": "MODERATE"
}