T09 · Insecure Skill Coding Practices
- Location
handler.js:10- Finding
Shell Injection Allows Command Execution Outside the Intended tmux Session
- Content
View full analysis
/tmp/claw-shell-proof) ``` 2. `isDangerous()` does not reject the input because it contains none of the denylisted strings. 3. `sendCommand()` interpolates the input into the shell command: ```text tmux send-keys -t claw "echo $(id > /tmp/claw-shell-proof)" C-m ``` 4. The shell launched by `execSync()` evaluates `$(id > /tmp/claw-shell-proof)` before invoking `tmux`. 5. The injected `id` command therefore runs outside tmux with the identity and permissions of the Skill process. 6. Only the resulting substituted text is passed to the tmux pane, which can make the out-of-session execution less apparent in captured output. ### Impact Assessment An attacker can execute arbitrary shell commands in the host context of the Skill handler rather than only inside the designated tmux ses ...[truncated 495 chars]- Remediation
View remediation
