T09 · Insecure Skill Coding Practices
- Location
SKILL.md:48- Finding
Shell Command Injection Through User-Controlled URL Interpolation
- Content
View full analysis
&1 ``` ```bash python3 ~/.openclaw/scripts/wx_extract.py "{url}" ``` ### Technical Analysis The Skill directs the agent to interpolate a user-supplied URL directly into shell command text. Enclosing the placeholder in double quotes does not make arbitrary input safe. A URL containing a double quote can terminate the quoted argument, after which shell operators, command substitutions, redirections, or additional commands can be introduced. This issue applies to commands executed by the agent on the VPS and to the PowerShell command presented to the user. The latter could become dangerous if a maliciously constructed URL is copied and executed without inspection. The Skill does not prescribe URL parsing, scheme validation, host allowlisting, structured process invocation, or shell-safe argument encoding. ### Attack Path 1. An attacker supplies a crafted `!skill` URL containing a quote-breaking payload. 2. The agent selects the applicable platform execution card. 3. The `{url}` placeholder is substituted into the documented command. 4. The malicious quote terminates the intended URL argument. 5. The shell or PowerShell interpreter processes the remaining payload as command syntax. 6. The injected command runs with the privileges of the agent process or, for the local fallback, the user executing PowerShell. ### Impact Assessment Successful exploitation can provide arbitrary command execution under the account runnin ...[truncated 364 chars]- Remediation
View remediation
