T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:12- Finding
Excessive Bash and File-Read Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 12
Vulnerability Type: Excessive tool permissions that violate least privilege
Risk Level: MediumVulnerable Code Snippet:
yaml allowed-tools: Bash, ReadTechnical Analysis
The skill is documented as generating an insurance-agency client education handout. Its workflow consists of clarifying content requirements, drafting the handout, enriching supporting material, and refining the output. This documented purpose does not require arbitrary shell-command execution.
Granting access to
Bashcreates a general local command-execution capability, whileReadmay permit access to files unrelated to the requested handout. These permissions exceed the minimum capabilities required by the stated workflow. If attacker-controlled task content or referenced source material influences the agent, it could attempt to induce the agent to use these tools outside the intended scope.The finding concerns excessive authorization in the skill configuration. The reviewed files do not contain an explicit malicious command or an instruction that directly exploits these permissions.
Attack Path
- A user or external content supplies adversarial instructions as part of a handout-generation request.
- The skill is loaded with both
BashandReadavailable. - The adversarial content instructs the agent to inspect unrelated local files or execute shell commands under the pretext of collecting supporting information.
- If the agent follows those instructions without adequate runtime authorization controls, it invokes
ReadorBash. - The operation runs with the filesystem access and operating-system privileges of the host process.
Impact Assessment
Successful exploitation could allow unauthorized reading of files accessible to the agent process and execution of local commands with that process's privileges. Depending on the runtime environmen ...[truncated 545 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
Bashfromallowed-tools, because arbitrary command execution is not necessary for generating an educational handout. - Remove
Readif the skill is expected to work exclusively from information supplied in the conversation. - If source-document reading is required, restrict access to explicitly selected, user-approved files or a dedicated workspace directory.
- Require per-operation user confirmation for access outside the active project or uploaded-document directory.
- Apply runtime sandboxing, filesystem allowlists, command allowlists, and outbound-network restrictions as defense-in-depth controls.
- Document every required tool and the specific workflow step that needs it, rejecting permissions that cannot be justified by the skill's stated function.
A hardened declaration should omit unnecessary tools, for example:
yaml allowed-tools: []If the platform requires a different syntax for declaring no tools, use its supported empty or omitted configuration.
- Remove
