T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:4- Finding
Unnecessary Bash Permission Violates Least-Privilege Principles
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:4
Vulnerability Type: Excessive tool permission
Risk Level: MediumVulnerable Code Snippet:
yaml --- name: Generate Finance Ad Creative Brief description: "Plan campaign visuals and hooks for finance promotions. Use when working on paid campaign planning for finance teams, analysts, operators." allowed-tools: Bash, Read metadata:Technical Analysis
The skill grants access to the
Bashtool even though its documented purpose is limited to creating finance advertising briefs. The workflow describes gathering requirements, drafting content, enriching assets or supporting data, and refining the result. It does not identify any legitimate need to execute operating-system commands.Granting shell access beyond the requirements of the stated task violates the principle of least privilege. If untrusted campaign content, supporting documents, or user instructions influence the agent, they could potentially induce it to invoke Bash for operations unrelated to brief generation. The finding concerns the exposed permission boundary; the reviewed file does not itself contain a malicious shell command or an instruction to execute one.
Attack Path
- A user loads the skill, making both
ReadandBashavailable to the agent. - The agent processes attacker-controlled or otherwise untrusted campaign requirements or supporting content.
- That content attempts to persuade or instruct the agent to invoke Bash under the pretext of gathering data, enriching assets, or completing the workflow.
- If the agent follows the injected instruction and the runtime does not impose additional controls, shell commands execute with the operating-system privileges and filesystem/network access granted to the agent process.
- The resulting command could access local files, modify workspace data, invoke installed programs, or communicate over the network, subject t ...[truncated 692 chars]
- A user loads the skill, making both
- Remediation
View remediation
Remediation Suggestions
-
Remove
Bashfromallowed-toolsbecause the documented content-generation workflow does not require shell execution. -
Reduce the declaration to the minimum necessary permission set, such as:
yaml allowed-tools: Read -
If a future feature genuinely requires command execution, expose a narrowly scoped tool or fixed operation instead of unrestricted Bash.
-
Require explicit user approval for any shell invocation and enforce command, argument, filesystem, and network allowlists at runtime.
-
Run necessary commands in an isolated sandbox with minimal filesystem access, no inherited secrets, restricted network access, resource limits, and a non-privileged operating-system identity.
-
Document the exact reason for every granted tool and periodically verify that declared permissions remain necessary.
-
