T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:8- Finding
Unnecessary Shell Execution and Local File Read Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:8
Vulnerability Type: Excessive tool permissions violating least privilege
Risk Level: MediumComplete Code Snippet:
yaml allowed-tools: Bash, ReadTechnical Analysis
The skill is designed to generate social-media captions, hashtags, calendars, and images. Its documented workflow does not require arbitrary shell command execution or unrestricted access to local files. Nevertheless, the configuration grants access to both
BashandRead.These tools exceed the permissions needed for the declared functionality. If an agent follows attacker-controlled content embedded in a user request or referenced material,
Readcould be misused to access files available to the agent process, whileBashcould execute unrelated operating-system commands. The resulting access remains subject to the operating-system privileges and sandbox restrictions of the process hosting the agent.Attack Path
- A user or untrusted content source supplies a crafted social-media generation request containing instructions to inspect local files or run shell commands.
- The skill is loaded with
BashandReadenabled. - The agent is induced to treat the malicious instructions as necessary steps in content generation.
- The agent invokes
Readto access local data orBashto execute commands unrelated to the skill's purpose. - Retrieved information may be incorporated into generated output or shell commands may modify resources accessible to the agent process.
Impact Assessment
Successful exploitation could provide access to files readable by the agent process and permit command execution with that process's operating-system privileges. Depending on the runtime sandbox, accessible resources could include project files, configuration data, environment-derived credentials, or other local user data. Shell access may also allow file modification, network operati ...[truncated 367 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
BashandReadfromallowed-tools; permit only the chat and image-generation capabilities required by the documented workflow. - If users must provide source files, replace unrestricted reading with an explicit user-selected file interface restricted to approved paths and file types.
- If shell execution becomes necessary for a future feature, expose narrowly scoped operations rather than arbitrary
Bashaccess. Enforce command allowlists, fixed arguments, path validation, timeouts, and an isolated low-privilege sandbox. - Require explicit user confirmation before accessing local data or performing side effects.
- Prevent generated content and untrusted source material from being interpreted as tool-use instructions.
- Add tests verifying that ordinary content-calendar requests cannot trigger local file access or operating-system commands.
- Remove
