T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:7- Finding
Excessive Shell and Filesystem Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 7
Vulnerability Type: Excessive tool permissions that violate least privilege
Risk Level: MediumVulnerable Code
yaml allowed-tools: Bash, ReadTechnical Analysis
The skill is intended to generate an educational handout using chat and image-generation capabilities. Its documented workflow does not require arbitrary shell-command execution or access to local files. Nevertheless, the configuration grants both
BashandRead.Granting tools beyond the skill's legitimate operational requirements expands its attack surface. If attacker-controlled content, a malicious prompt, or untrusted source material influences the agent, the unnecessary tools could be invoked to execute commands or inspect files unrelated to handout generation. The repository does not document restrictions that constrain these tools to specific commands, paths, or read-only project resources.
Attack Path
- A user or external document supplies attacker-controlled instructions while the skill is active.
- Those instructions induce the agent to invoke the permitted
BashorReadtool under the pretext of gathering information or preparing the handout. - The agent reads unrelated local files or executes shell commands that are not necessary for the declared task.
- Data accessible to the agent may be disclosed through generated output, while shell commands may alter resources available under the agent process's operating-system privileges.
This path depends on successful manipulation of the agent and the permissions provided by its execution environment; the reviewed files do not themselves contain a command that automatically performs these actions.
Impact Assessment
Successful exploitation could expose files readable by the agent process and permit command execution with the same operating-system privileges as that process. The scope may include project files, local configuration, environ ...[truncated 225 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
BashandReadfromallowed-toolsbecause neither capability is required by the documented handout-generation workflow. - Permit only the capabilities needed for the task, such as the documented
chatandimage_generationAPIs. - If local reading later becomes necessary, replace unrestricted access with a narrowly scoped read-only interface limited to explicitly approved project files.
- If command execution becomes unavoidable, use an allowlist of fixed commands and arguments, prohibit shell interpolation, run commands in a sandbox, and deny access to credentials, network resources, and unrelated filesystem paths.
- Add documentation explaining why each permitted tool is necessary and test that untrusted prompts cannot trigger access outside the skill's intended scope.
- Remove
