Executive brief
OpenClaw's Clawdbot is a macOS application for remote SSH connections. A flaw in how it handles SSH project paths and target strings allows an attacker to inject arbitrary shell commands and gain code execution on either the user's local machine or their remote SSH server, potentially compromising sensitive systems and data.
Technical details
The vulnerability involves two related OS command injection flaws in CommandResolver.swift: (1) the sshNodeCommand function fails to escape user-supplied project paths before interpolating them into a shell script's error message, and when the cd command fails, the unescaped path is echoed directly, enabling arbitrary command execution on the remote SSH host; (2) the parseSSHTarget function does not validate SSH target strings, allowing attackers to supply targets beginning with a dash (e.g., -oProxyCommand=...) which are interpreted as SSH configuration flags rather than hostnames, enabling local code execution. Both vectors require an attacker to influence the user's remote connection settings via social engineering or malicious configuration, and require user interaction. The vulnerability affects only the macOS menubar application in Remote/SSH mode; CLI, web gateway, and iOS/Android apps are unaffected. A patch was released in version 2026.1.29.
Affected products
- OpenClaw Clawdbot <2026.1.29
Timeline
- 2026-02-02: disclosed: Advisory published
- 2026-01-29: patched: Fix released in version 2026.1.29