T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:6- Finding
Excessive and Inconsistent Tool Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 6 and 18–21
Vulnerability Type: Excessive tool privileges and inconsistent access-control declarations
Risk Level: MediumVulnerable Code
yaml allowed-tools: read execyaml tools: - exec - read - writeTechnical Analysis
The skill is designed to provide consumer cloud-storage recommendations and clarify synchronization or storage concepts. These advisory functions do not require shell execution, local file reading, or file modification.
Nevertheless, the configuration grants
exec,read, andwritecapabilities. It also contains inconsistent permission declarations:allowed-toolspermits onlyreadandexec, while the separatetoolslist additionally declareswrite. Depending on how the hosting agent interprets these fields, the broader declaration may grant file-modification privileges or create ambiguous access-control behavior.These permissions violate the principle of least privilege. If untrusted user instructions, indirect prompt injection, or another compromised instruction source influences the agent, the unnecessary tools could become an execution channel for operations unrelated to the skill's stated purpose.
Attack Path
- An agent loads the skill and grants the tools declared in its metadata.
- An attacker submits a crafted cloud-storage question containing instructions to inspect local files, execute a system command, or modify a file.
- The agent incorrectly treats the embedded instructions as necessary to fulfill the request.
- The agent invokes
read,exec, orwriteusing the unnecessarily broad permissions. - The attacker may obtain command output or local file contents, or cause unauthorized local file changes, subject to the host agent's sandbox and operating-system permissions.
No malicious command is directly embedded in the audited file; exploitation depends on ...[truncated 622 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
exec,read, andwritebecause the documented advisory workflow does not require tools. - Keep a single authoritative tool-permission declaration to prevent parser-dependent privilege differences.
- If a future feature genuinely requires filesystem access, grant only the specific operation needed and restrict it to an explicitly approved directory.
- If command execution becomes necessary, use a fixed command allowlist, prohibit shell interpretation, pass arguments as structured arrays, and never concatenate user-controlled input into commands.
- Require explicit user confirmation before any state-changing operation.
- Run the skill in a sandbox with minimal filesystem access, no inherited secrets, restricted network access, and a low-privilege operating-system identity.
- Add automated validation that rejects conflicting tool declarations and flags permissions unsupported by documented functionality.
- Remove
