T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:12- Finding
Unnecessary Shell and File-Read Permissions Violate Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 12
Vulnerability Type: Excessive tool permissions
Risk Level: MediumVulnerable Code:
yaml allowed-tools: Bash, ReadTechnical Analysis
The skill is designed to generate an executive-recruiting client education handout. Its documented workflow involves clarifying requirements, drafting content, enriching assets, and refining the result. None of these activities establishes a legitimate need for arbitrary shell-command execution or broad access to local files.
Declaring both
BashandReadexpands the agent's authority beyond the skill's documented purpose. In an environment where tool access is enforced through this configuration, malicious or untrusted prompt content could attempt to induce the agent to execute operating-system commands or inspect files accessible to the hosting process. This violates the principle of least privilege.The permission declaration does not itself execute commands or read files, and the audited files contain no direct malicious payload. Exploitation therefore depends on a separate source of attacker-controlled instructions or prompt injection while the skill is active.
Attack Path
- A user or external content supplies attacker-controlled instructions while the skill is active.
- Those instructions attempt to redirect the agent from handout generation toward local file discovery or shell-command execution.
- Because
SKILL.mdauthorizesReadandBash, the agent may invoke these tools rather than rejecting the request as outside its available capabilities. - The
Readtool could expose files accessible to the agent process, whileBashcould execute commands with the operating-system privileges of that process. - Any obtained information or command output could then be incorporated into the response or used in subsequent actions.
Impact Assessment
Successful exploitation could provide ...[truncated 542 chars]
- Remediation
View remediation
Remediation Suggestions
Remove
BashandReadfromallowed-toolsbecause they are not required for the documented content-generation workflow.If local asset access is genuinely necessary:
- Do not authorize
Bash; use a purpose-built asset-reading tool instead. - Restrict read access to an explicit project workspace or asset directory.
- Deny access to credentials, configuration files, home directories, SSH material, environment files, and other sensitive paths.
- Require explicit user confirmation before accessing files not directly supplied for the handout.
- Validate file paths using canonicalization and an allowlist to prevent path traversal.
- Document the exact reason each enabled tool is required.
- Apply runtime sandboxing and command-approval controls as defense in depth.
- Do not authorize
