T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:4- Finding
Excessive Shell and Filesystem Permissions for a Content-Generation Skill
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 4
Vulnerability Type: Excessive tool permissions and violation of least privilege
Risk Level: MediumComplete Code Snippet:
yaml allowed-tools: Bash, ReadTechnical Analysis
The skill is intended to create a client education handout, but it grants access to the
BashandReadtools. The documented workflow does not require arbitrary shell command execution or unrestricted local file access. Granting these capabilities expands the skill's authority beyond its stated content-generation purpose and violates the principle of least privilege.The file does not contain instructions that directly abuse these permissions. Nevertheless, if the skill processes malicious or prompt-injected content, the unnecessary tools could provide an execution channel through which an agent may be induced to run commands or read local files. The actual exploitability depends on how the host enforces tool permissions, user confirmation, path restrictions, command sandboxing, and prompt-injection defenses.
Attack Path
- A user or external content source supplies attacker-controlled instructions as part of a handout-generation request.
- The injected instructions attempt to redirect the agent from document creation to local system operations.
- Because the skill permits
Read, the agent may be induced to access local configuration, project files, credentials, or other readable data. - Because the skill permits
Bash, the agent may be induced to execute shell commands within the privileges and sandbox boundaries of the hosting process. - Retrieved information could potentially be incorporated into generated output or commands could alter accessible files and processes.
This is a conditional attack path; the audited skill itself contains no malicious command, exfiltration instruction, persistence mechanism, or remote payload retrieval.
Impact Asse
...[truncated 451 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
BashandReadfromallowed-toolsbecause they are not required by the documented handout-generation workflow. - Permit only narrowly scoped content-generation capabilities, such as the declared chat and image-generation APIs.
- If local assets must be read, replace unrestricted
Readaccess with a path-scoped reader limited to a dedicated, non-sensitive input directory. - If command execution later becomes necessary, expose purpose-built operations instead of a general shell. Enforce fixed command templates, argument validation, command allowlists, sandboxing, and explicit user confirmation.
- Treat client prompts, uploaded documents, and retrieved content as untrusted data. Prevent instructions embedded in such content from authorizing tool use or changing the skill's security boundaries.
- Apply runtime filesystem isolation, least-privileged service accounts, environment-secret filtering, and logging of all sensitive tool invocations.
- Remove
