T09 · Insecure Skill Coding Practices
- Location
SKILL.md:50- Finding
Untrusted External Repair Guidance May Lead to Arbitrary Command Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 50-85
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: HighVulnerable Excerpt
markdown Search the following channels in priority order: 1. Local solution database 2. GitHub Issues 3. GitHub Pull Requests 4. OpenClaw community 5. Official documentation Repair strategy: | Error type | Repair method | | Dependency missing | Execute npm install / pip install, etc. | | Configuration error | Modify configuration files | | Permission problem | Repair file/directory permissions | | Service not started | Start the related service | | Code bug | Generate a patch file |The excerpt is an English translation of the corresponding Skill instructions.
Technical Analysis
The Skill directs the agent to search external sources and then apply discovered solutions through commands, patches, configuration changes, permission changes, or service operations. It does not require:
- Treating remote content as untrusted data.
- Verifying the provenance or integrity of a proposed command.
- Restricting commands to a reviewed allowlist.
- Rejecting shell operators, command substitutions, or privilege-elevation requests.
- Executing repairs in a sandbox.
- Limiting filesystem access to an approved project directory.
Search results from GitHub issues, pull requests, forums, or documentation can contain attacker-controlled text. If the agent interprets that text as operational instructions, a malicious repair recommendation could become an arbitrary local command.
This is not direct remote payload retrieval by code in the package; instead, it is an unsafe trust boundary between externally sourced advice and privileged agent tool execution.
Attack Path
- An attacker publishes a GitHub issue, forum post, or other indexed page containing an error message that matches a likely OpenClaw failure.
- The attacker presents a malicious shell command or patch as a purported solut ...[truncated 1065 chars]
- Remediation
View remediation
Remediation Suggestions
- Treat every search result, issue body, forum post, and retrieved patch as untrusted data.
- Never execute externally suggested commands automatically.
- Display the exact command, working directory, environment changes, and affected files before execution.
- Require explicit user approval for every command originating from an external source.
- Enforce a structured command allowlist rather than passing free-form text to a shell.
- Reject shell metacharacters, redirections, command substitutions, pipelines, and privilege-elevation commands unless separately reviewed.
- Execute diagnostics and proposed repairs in an isolated sandbox with network, filesystem, and process restrictions.
- Permit writes only inside an explicitly approved workspace.
- Validate patches for unexpected file paths, symlinks, generated binaries, hooks, and credential access.
- Record the source URL, content hash, approved command, execution result, and rollback result in an audit log.
