T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:5- Finding
Unnecessary Shell Capability Violates Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:5
Vulnerability Type: Excessive tool permission
Risk Level: MediumVulnerable Code
yaml allowed-tools: Read, Edit, Write, Glob, Grep, Bash, AskUserQuestion, mcp__claude_ai_Actions_Team__listActions, mcp__claude_ai_Actions_Team__listProjectsTechnical Analysis
The skill grants access to the
Bashtool even though its documented workflow only requires reading, searching, creating, and editing journal files; asking the user questions; and querying two Brain MCP endpoints. No instruction in the reviewed skill requires shell command execution.This violates the principle of least privilege. The skill processes potentially untrusted content from journals,
inbox.md, and externally supplied Brain tasks and projects. If any of that content contains prompt-injection instructions that influence the agent, the unnecessaryBashpermission provides a command-execution channel that is substantially more powerful than the legitimate journaling operations require.The permission alone does not demonstrate that malicious commands are currently executed. The risk arises because it unnecessarily expands the impact of a successful prompt-injection or agent-control failure.
Attack Path
- An attacker places adversarial instructions in content the skill is expected to load, such as a shared journal entry, inbox item, Brain task, or Brain project.
- The user invokes the morning skill.
- The skill reads the attacker-controlled content as part of its normal context-loading process.
- The injected content attempts to persuade the agent to invoke
Bash. - Because
Bashis explicitly permitted, a successful instruction injection could cause local shell commands to run with the privileges of the OpenClaw process.
This path depends on the agent accepting the injected instruction and on an attacker being able to influence one of the loaded data sources.
Impact Assessment
Successful ex ...[truncated 667 chars]
- Remediation
View remediation
Remediation Suggestions
Remove
Bashfrom theallowed-toolsdeclaration and retain only the tools required by the documented workflow:yaml allowed-tools: Read, Edit, Write, Glob, Grep, AskUserQuestion, mcp__claude_ai_Actions_Team__listActions, mcp__claude_ai_Actions_Team__listProjectsApply the following additional hardening measures:
- Treat journal, inbox, task, and project text strictly as untrusted data rather than executable instructions.
- Require explicit user confirmation before performing destructive or broad file modifications.
- Constrain file operations to the documented journal and inbox paths where the host supports path-based permissions.
- If shell access becomes necessary in a future version, document the exact use case and replace unrestricted shell access with a narrowly scoped tool or fixed command allowlist.
- Add regression checks ensuring that new tool permissions correspond to a documented and necessary workflow step.
