T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:20- Finding
Excessive Filesystem and Command-Execution Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:20-26
Vulnerability Type: Excessive tool permissions violating least privilege
Risk Level: MediumVulnerable Code
yaml tools: - read - exec - write - glob - grep homepage: ""The Skill also states at
SKILL.md:65:text | Tool execution environment | Runtime | Optional | Some Agent Loop demonstrations require exec capability to execute Python/Shell scripts |Technical Analysis
The Skill's stated purpose is to assist with prompt engineering, task decomposition, Agent-loop design, tool selection, output parsing, and token optimization. These activities can generally be performed through text generation and do not inherently require unrestricted command execution or broad filesystem access.
Nevertheless, the Skill requests
read,write,glob,grep, andexeccapabilities globally. The document does not define path restrictions, command allowlists, execution sandboxing, write boundaries, or approval requirements. In particular,execcan run Python or shell commands under the hosting Agent's operating-system identity, while the filesystem tools can discover, read, and modify files accessible to that identity.This constitutes a least-privilege violation. Although no malicious command or executable payload is embedded in the audited file, unsafe or attacker-controlled input could influence an Agent using these capabilities to perform actions outside the Skill's legitimate prompt-design scope.
Attack Path
- A user or untrusted document supplies crafted instructions to an Agent with this Skill loaded.
- The Skill is granted its declared
read,write,glob,grep, andexeccapabilities. - The crafted input causes the Agent to generate or follow a workflow involving filesystem inspection, file modification, or shell execution.
- Because the Skill specifies no path boundaries, command allowlis ...[truncated 979 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
exec,write,glob, andgrepfrom the default tool declaration unless a specific documented operation requires them. - Grant tools per task rather than globally. Prompt-design and advisory operations should run without command execution or write access.
- Restrict all filesystem access to a dedicated workspace root and reject path traversal, absolute paths outside that root, and symbolic-link escapes.
- If command execution is retained, run it in an isolated sandbox with:
- A strict executable and argument allowlist.
- No inherited secrets or unnecessary environment variables.
- Network access disabled by default.
- Resource, runtime, and output limits.
- A non-privileged operating-system account.
- Require explicit user confirmation before writing files or executing commands, displaying the exact target path or command beforehand.
- Separate demonstrations from operational behavior. Code examples should not require live execution unless the user explicitly opts in.
- Add audit logging for filesystem writes and command execution, including the initiating request, command, working directory, and result.
- Replace the recommendation to run with administrator privileges at
SKILL.md:360with least-privilege troubleshooting guidance.
- Remove
