T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:34- Finding
Unnecessary Command Execution and File-Write Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:34-37
Vulnerability Type: Excessive tool permissions and violation of least privilege
Risk Level: MediumVulnerable Code
yaml tools: - read - exec - writeThe excessive permissions are reinforced by the execution-capable classification at
SKILL.md:118-119:markdown ### Availability Classification - **Category**: MD+execute()Technical Analysis
The skill's stated purpose is to transform supplied text using an Agent-provided language model. The reviewed file does not define an implementation, workflow, or legitimate operational requirement for running system commands or modifying local files.
Nevertheless, the skill requests both
execandwrite. If the hosting Agent grants the declared tools, these permissions extend the skill's authority beyond what is necessary for text transformation:execcan permit local command execution with the privileges of the Agent process.writecan permit creation or modification of files accessible to the Agent process.- Their combination can permit writing a script or configuration file and subsequently executing or activating it.
This violates least-privilege principles and unnecessarily increases the impact of prompt injection, malicious user-supplied content, or unsafe future modifications to the skill. The reviewed skill does not itself contain instructions that actively exploit these permissions, so this finding concerns the exposed privilege boundary rather than a confirmed malicious payload.
Attack Path
- A platform loads the skill and grants the tools declared in its metadata.
- The skill processes attacker-controlled or otherwise untrusted text.
- Malicious text attempts to induce the Agent to invoke the unnecessarily available
writeorexectool. - If the Agent fails to isolate data from instructions or lacks command-level authorization controls, it ...[truncated 1101 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
execandwritefrom the declared tools. Retain only the minimum capability required to receive text and return transformed text. - Remove the
MD+execute()classification unless executable functionality is implemented and demonstrably required. - If file export is later added, expose a narrowly scoped write operation rather than unrestricted filesystem access:
- Restrict writes to a dedicated output directory.
- Reject absolute paths and path traversal sequences.
- Prevent overwriting existing files unless explicitly authorized.
- Apply restrictive file permissions.
- If command execution later becomes essential:
- Use a fixed allowlist of commands and arguments.
- Never construct shell commands from user-controlled text.
- Avoid invoking a shell where direct process APIs are available.
- Run commands in a sandbox with no unnecessary network access or credentials.
- Require explicit user confirmation before execution.
- Treat all transformed content as untrusted data and prevent it from being interpreted as Agent instructions.
- Add automated policy checks that reject skill manifests requesting tools unsupported by documented functionality.
- Remove
