| शीर्षक | 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 AM (1 महीना पहले) |
|---|
| संयम | 13/07/2026 11:12 PM (1 month later) |
|---|
| स्थिति | स्वीकृत |
|---|
| VulDB प्रविष्टि | 378163 [louisho5 picobot तक 0.2.0 exec Tool exec.go ExecTool.Execute अधिकार वृद्धि] |
|---|
| अंक | 20 |
|---|