T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:8- Finding
Unnecessary Unrestricted Shell Capability
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 8
Vulnerability Type: Excessive tool permissions / violation of least privilege
Risk Level: MediumVulnerable Code
yaml allowed-tools: Bash(*)Technical Analysis
The skill is designed as a conversational human-approval gate: it identifies high-risk actions and asks the user to approve, reject, or modify them. Its documented behavior does not require executing shell commands. Nevertheless, its metadata grants unrestricted access to Bash.
This permission exceeds the skill's legitimate functional requirements and weakens the security boundary between approval logic and action execution. Because the documented gate is explicitly model-cooperative rather than technically enforced, prompt injection or incorrect agent behavior could cause the skill's unrestricted shell capability to be invoked instead of merely requesting approval.
No shell command is embedded in the reviewed files, so this finding does not establish intentional malicious execution. It identifies an exposed execution capability whose exploitability depends on the host agent honoring and making available the declared tool permission.
Attack Path
- The host loads the
human-approvalskill and grants the declaredBash(*)permission. - An attacker supplies adversarial instructions through user-controlled or otherwise untrusted content.
- Those instructions persuade or confuse the model into issuing a Bash tool call rather than stopping at the conversational approval gate.
- Because the Bash permission is unrestricted, the resulting command executes with the operating-system privileges and filesystem access of the agent process.
- The command may read, alter, move, or delete resources accessible to that process.
Impact Assessment
Successful exploitation could provide command execution within the privilege scope of the host agent. Depending on the deployment environment, this may expose project file ...[truncated 393 chars]
- The host loads the
- Remediation
View remediation
Remediation Suggestions
- Remove
allowed-tools: Bash(*), because the documented approval workflow requires no shell execution. - Prefer declaring no tools for a purely conversational approval gate.
- If persistent approval configuration is implemented later, expose a narrowly scoped configuration API rather than a general-purpose shell.
- If Bash is unavoidable, replace the wildcard permission with an explicit allowlist of commands and arguments, deny command chaining and redirection, and run commands in a restricted sandbox.
- Enforce approval independently at the tool-execution boundary. Do not rely solely on model instructions to prevent unauthorized operations.
- Add a negative security evaluation confirming that prompt injection cannot cause shell execution before approval.
- Remove
