T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:4- Finding
Excessive Tool Permissions Violate Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 4
Vulnerability Type: Excessive tool authorization
Risk Level: MediumVulnerable Code Snippet
yaml allowed-tools: Read, Write, Edit, Bash, WebSearch, WebFetch, Glob, Grep, SkillTechnical Analysis
The skill is a text-based Taoist strategy adviser whose documented behavior consists of analyzing user scenarios and generating recommendations. This functionality does not require shell execution, filesystem modification, arbitrary network access, or loading additional skills.
Nevertheless, the configuration authorizes
Write,Edit,Bash,WebSearch,WebFetch, andSkill. These capabilities exceed the skill's legitimate operational requirements and violate the principle of least privilege. In an agent environment where declared tools become available while the skill is active, malicious user input or indirect prompt injection could attempt to induce actions unrelated to strategic advice.The permission declaration alone does not prove that commands are executed automatically, and no malicious command or payload was found in the project. The risk arises from the unnecessary capabilities exposed to an influenced agent.
Attack Path
- A user loads or triggers the strategy-adviser skill.
- The agent receives the broad tool set declared on line 4.
- The user supplies malicious instructions, or the agent processes attacker-controlled content containing indirect prompt injection.
- The injected instructions attempt to invoke an unnecessary privileged tool:
Bashfor local command execution;WriteorEditfor filesystem modification;WebFetchorWebSearchfor external communication;Skillfor loading additional behavior.
- If the host relies on this allowlist without independent authorization controls, the agent may perform actions outside the advisory task's intended scope.
Impact Assessment
Successful exploitation could permit op ...[truncated 607 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove every tool that is not essential to the declared advisory function.
- Prefer an empty tool allowlist when the skill can answer entirely from its embedded instructions.
- If packaged reference files are added and must be consulted, authorize only
Readand constrain it to the skill directory. - Remove
Bash,Write,Edit,WebSearch,WebFetch, andSkillunless a documented, reviewed use case requires each capability. - Enforce runtime controls independently of skill metadata:
- Require explicit user confirmation for shell, write, and network operations;
- Restrict filesystem access to a dedicated sandbox;
- Apply outbound network allowlists;
- Prevent recursive or untrusted skill loading;
- Log and audit privileged tool invocations.
- Add automated validation that rejects skill manifests whose permissions exceed the capabilities required by their documented workflows.
A hardened configuration would use no tools, or at most:
yaml allowed-tools: Read
