| Название | louisho5 picobot 0.2.0 OS Command Injection (CWE-78) |
|---|
| Описание | # Technical Details
An OS command execution vulnerability exists in the `[ExecTool.Execute]` method in `internal/agent/tools/exec.go` of picobot.
The application fails to reject shell-wrapper payloads in array-form `exec` tool calls. `ExecTool.Execute` validates only `argv[0]` against a short dangerous-program blacklist and applies limited argument checks before passing the command to `exec.CommandContext`. A payload such as `["sh","-c","echo openclaw-shell-wrapper-bypass-canary > marker.txt"]` bypasses the intended restrictions and executes attacker-controlled shell syntax.
# Vulnerable Code
File: `internal/agent/tools/exec.go`
Method: `ExecTool.Execute`
Why: The code checks only the outer executable and does not inspect nested shell payloads supplied through `sh -c`, allowing arbitrary shell command execution.
# Reproduction
1. Build the Picobot binary and run a local OpenAI-compatible stub provider.
2. Return an `exec` tool call containing `["sh","-c","echo openclaw-shell-wrapper-bypass-canary > marker.txt"]`.
3. Run `picobot agent -m ...` and confirm that `marker.txt` is created with the expected canary content.
# Impact
- Permits arbitrary shell command execution as the Picobot OS user.
- Can expose secrets, alter files, and tamper with code or local infrastructure reachable by the process. |
|---|
| Источник | ⚠️ https://github.com/louisho5/picobot/issues/42 |
|---|
| Пользователь | Eric-h (UID 97582) |
|---|
| Представление | 11.06.2026 11:27 (1 месяц назад) |
|---|
| Модерация | 13.07.2026 23:12 (1 month later) |
|---|
| Статус | принято |
|---|
| Запись VulDB | 378163 [louisho5 picobot до 0.2.0 exec Tool exec.go ExecTool.Execute эскалация привилегий] |
|---|
| Баллы | 20 |
|---|