T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:10- Finding
Excessive Tool Permissions Violate Least-Privilege Requirements
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:10-14
Vulnerability Type: Excessive tool permissions
Risk Level: MediumVulnerable Code
yaml tools: - Read - Write - Bash - ExecTechnical Analysis
The skill requests
Write,Bash, andExeccapabilities even though the reviewed implementation only performs filesystem existence checks and reads files through Node.jsfsAPIs. No implemented feature requires writing files or executing operating-system commands.This violates the principle of least privilege. In an agent environment where declared tools are granted to the loaded skill, a malicious or attacker-controlled evaluation context could attempt to influence the agent into using these unnecessary capabilities. The finding concerns the capability boundary exposed by the skill manifest; the reviewed source code does not itself invoke shell commands or write files.
Attack Path
- An agent loads the skill and grants the tools declared in
SKILL.md. - The skill receives
Write,Bash, andExecaccess despite only requiring read access for its implemented behavior. - Attacker-controlled content or context encountered during an evaluation attempts to influence the agent's subsequent tool use.
- If the agent follows those instructions without sufficient independent authorization controls, it may execute commands or modify files using the unnecessary privileges.
- The resulting effects occur with the filesystem and operating-system permissions of the agent process.
Impact Assessment
Successful exploitation could permit arbitrary command execution or filesystem modification within the privileges of the hosting agent. Potential effects include alteration or deletion of accessible files, modification of project artifacts, access to data available to executed processes, and execution of additional local programs.
The practical scope depends on the host's to ...[truncated 221 chars]
- An agent loads the skill and grants the tools declared in
- Remediation
View remediation
Remediation Suggestions
-
Restrict the declared tools to the minimum capability required by the current implementation:
yaml tools: - Read -
Do not add
Write,Bash, orExecunless a concrete feature requires them. -
If future functionality must execute tests or generate reports, separate those operations into narrowly scoped capabilities with:
- Explicit user confirmation before execution.
- Command and argument allowlists.
- Fixed working directories and canonicalized path validation.
- Filesystem write restrictions limited to a dedicated output directory.
- Process timeouts and resource limits.
- A sandbox with no unnecessary credentials or network access.
-
Add automated checks that compare declared permissions against actual implementation requirements and reject unnecessary privileged tools during review.
-
