T09 · Insecure Skill Coding Practices
- Location
references/config-schema.md:109- Finding
Arbitrary Command Execution Through Shell Substitution in Cron Prompts
- Content
View full analysis
") | .match.peer.id' ~/.openclaw/openclaw.json Use the output as the target for all Telegram messages in this task. ``` - **Date injection**: `$(date '+%A, %B %d, %Y')` after the preamble - **Explicit constraints**: source allowlists, recency rules, format templates - **Delivery instructions**: use `target=''` placeholder (resolved by the preamble) ``` ### Technical Analysis The documented cron configuration permits `$(...)` expressions in `payload.message` and states that they are evaluated before the prompt reaches the LLM. This crosses a trust boundary: text intended to serve as an LLM prompt is also interpreted as shell syntax. The Skill creates cron prompts from user-supplied task requirements but does not require validation or escaping of prompt content. It also does not restrict shell substitutions to the documented `date` expressions. Consequently, a malicious requirement containing a substitution such as `$(a ...[truncated 1633 chars]- Remediation
View remediation
