T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:8- Finding
Excessive Write and Command-Execution Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 8
Vulnerability Type: Violation of least privilege
Risk Level: MediumVulnerable Code
yaml allowed-tools: [Bash, Read, Write, Exec]Technical Analysis
The Skill is designed to inspect Skill metadata, document structure, and referenced files. Its implemented scripts only read files and print assessment results; they do not require file modification.
Nevertheless, the configuration grants
Writeand two broad command-execution capabilities,BashandExec. These permissions exceed the legitimate requirements of a read-only auditing workflow. Granting both execution mechanisms also unnecessarily increases the available attack surface.The declaration does not itself execute malicious commands. However, if the hosting agent makes these declared tools available while processing attacker-controlled Skill content, manipulated instructions could cause the agent to invoke capabilities that the auditor does not legitimately need.
Attack Path
- A user invokes the optimizer against an untrusted or attacker-controlled Skill.
- The optimizer is loaded with
Write,Bash, andExecavailable. - Malicious content in the target Skill attempts to influence the hosting agent's behavior.
- If the agent follows that content, it can invoke the unnecessarily granted tools.
- Commands may execute or files may be modified with the operating-system privileges of the hosting agent.
This repository does not contain an embedded payload that performs these steps; the vulnerability is the unnecessary privilege exposure that makes such an exploitation path possible.
Impact Assessment
Successful exploitation could permit:
- Modification of files writable by the hosting agent.
- Execution of arbitrary local commands under the agent's operating-system account.
- Access to local resources exposed to invoked shell commands.
- Damage beyond the intended read-only assessment scope.
...[truncated 135 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the unnecessary
Writepermission. - Retain
Readas the primary capability for assessment. - Do not grant both unrestricted
BashandExec. - If script execution is required, expose only a narrowly scoped invocation mechanism for the bundled validator.
- Require explicit user confirmation before any future operation that executes a command or modifies a file.
- Run validation scripts in a restricted environment with:
- A read-only project mount.
- No network access.
- Minimal environment variables.
- A dedicated low-privilege operating-system account.
- Add a permission regression test that fails if write or unrestricted execution capabilities are introduced without a documented requirement.
- Remove the unnecessary
