T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:16- Finding
Unnecessary Command-Execution Capability Violates Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:16-20andSKILL.md:55-57
Vulnerability Type: Excessive tool permissions
Risk Level: MediumThe skill declares access to the
exectool and identifies itself as an execution-enabled skill:yaml tools: - read - exec - glob - grepmarkdown ### Availability Classification - **Category**: MD+EXEC - **Description**: A Markdown-based AI Skill that drives the Agent to perform skill-creation tasks through natural-language instructionsTechnical Analysis
The documented functionality consists of guidance for designing and writing
SKILL.mdfiles. The package contains no scripts, and its workflow does not identify a legitimate operation that requires local command execution. Grantingexectherefore exceeds the permissions required for the stated task and violates the principle of least privilege.Execution-capable tools materially expand the security boundary of a documentation-only skill. If untrusted task content, generated instructions, or a future modification influences the agent into issuing a command, the unnecessary capability could turn a text-generation workflow into local code execution. The current file does not itself instruct the agent to execute a malicious command; the risk arises from exposing an execution channel that the documented workflow does not need.
Attack Path
- The skill is loaded with its declared
execcapability. - A user request, untrusted skill-creation example, or subsequently introduced instruction supplies command-like content.
- The agent interprets that content as an action required to complete the task.
- The agent invokes
exec, even though command execution is unnecessary for the legitimate workflow. - The command runs with the operating-system privileges and filesystem access available to the hosting agent.
This exploitation path is conditional on the platform granting ...[truncated 695 chars]
- The skill is loaded with its declared
- Remediation
View remediation
Remediation Suggestions
- Remove
execfrom the declared tool list and change the availability classification fromMD+EXECto a Markdown-only classification. - Retain only capabilities required by a documented workflow. Remove
read,glob, andgrepas well unless the skill is explicitly expected to inspect local project resources. - If command execution is added in a future version, document every permitted command and argument, apply explicit allowlists, reject shell metacharacters and untrusted command fragments, and require user confirmation before execution.
- Run any necessary future commands in a restricted sandbox with minimal filesystem access, no inherited secrets, limited network access, and a non-privileged operating-system account.
- Add a release-time validation check that compares declared tools against actual workflow requirements and rejects unused high-impact capabilities.
- Remove
