Executive brief
Sipeed PicoClaw is an AI assistant framework written in Go. A security flaw allows a local attacker to trick the system into executing commands in a different directory than the one approved by a human or automated policy. This could lead to unauthorized file access or modification within the workspace, bypassing the safety checks intended to restrict where commands can run.
Technical details
A Time-of-Check Time-of-Use (TOCTOU) race condition exists in the ExecTool.executeRun function within pkg/agent/pipeline_execute.go. The vulnerability occurs because the approval hook inspects the working directory (cwd) argument before the tool re-resolves symlinks immediately prior to process execution in pkg/tools/shell.go. A local attacker can exploit this window by swapping a workspace-local symlink after approval is granted but before execution begins. This causes the command to run in an 'evil' directory while the approval mechanism believes it is running in a 'safe' one. While the attack is restricted to the workspace, it breaks the integrity of the approval flow for relative file operations and directory-sensitive commands. As of the advisory date, no patch is available and the issue was marked as 'not planned' by the maintainers.
Affected products
- Sipeed PicoClaw <= 0.2.9
Timeline
- 2026-07-18: disclosed
- 2026-07-18: advisory