T09 · Insecure Skill Coding Practices
- Location
handler.js:10- Finding
Host Shell Command Injection Through Unsafe tmux Invocation
- Content
View full analysis
/tmp/claw-proof)" ``` causes the host shell to execute `id > /tmp/claw-proof` while preparing the arguments for `tmux`. This execution occurs outside the documented tmux session boundary. ### Attack Path 1. An attacker supplies a crafted `command` value to `claw_shell_run`. 2. The basic dangerous-command filter does not reject shell substitutions. 3. `sendCommand` escapes only literal double quotes. 4. The resulting string is passed to `execSync`, which invokes a host shell. 5. The host shell evaluates `$()` or backtick substitutions before launching tmux. 6. The substituted command executes directly with the privileges of the Node.js Skill process. 7. Its output is then embedded in the text sent to tmux, potentially concealing the separate host-side execution. ### Impact Assessment Successful exploitation permits arbitrary command execution with the operating-system privileges of the Skill process. An attacker may read or modify files accessible to that account, access environment variables and credentials, launch processes, modify the project workspace, or interact with other local resou ...[truncated 279 chars]- Remediation
View remediation
