T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:11- Finding
Excessive Bash and Filesystem Read Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:11
Vulnerability Type: Excessive tool permissions violating least privilege
Risk Level: MediumVulnerable Code Snippet:
yaml allowed-tools: Bash, ReadTechnical Analysis
The skill declares access to the
BashandReadtools, although its documented purpose is to generate product mockup images and its only listed API isimage_generation(SKILL.md:42-44). No documented workflow step requires arbitrary command execution or unrestricted local file reading.This permission set exceeds the skill's legitimate functional requirements. If the host platform grants these tools according to this declaration, malicious or attacker-controlled instructions introduced through a user prompt, external content, or a later modification to the skill could invoke shell commands or inspect files available to the agent. The declaration does not itself execute commands, but it unnecessarily exposes powerful capabilities that could make a subsequent prompt-injection or skill-compromise event materially more damaging.
Attack Path
- A user installs and loads the skill.
- The host grants the skill the declared
BashandReadcapabilities. - The skill processes attacker-controlled input or compromised follow-on instructions.
- Those instructions direct the agent to invoke
Readagainst accessible local files or useBashto execute operating-system commands. - Commands run with the privileges of the hosting agent process, allowing access beyond what image generation requires.
Impact Assessment
Successful exploitation could allow reading files accessible to the agent process and executing arbitrary shell commands under that process's operating-system account. The practical scope depends on the host's sandboxing, command approval controls, filesystem restrictions, and runtime identity. Potential consequences include disclosure of local data, modifi ...[truncated 146 chars]
- Remediation
View remediation
Remediation Suggestions
Remove
BashandReadfromallowed-toolsand grant only the image-generation capability required by the documented workflow. If the platform requires filesystem access for a specific future feature, restrict it to explicitly approved paths and read-only operations. If shell access becomes unavoidable, expose narrowly scoped commands through a dedicated wrapper rather than unrestrictedBash, validate all arguments against an allowlist, require user confirmation for sensitive operations, and run the skill in a sandbox with minimal filesystem and network access. Add automated checks that compare declared tools with documented functionality to prevent excessive permissions from being reintroduced.
