T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:45- Finding
Excessive Tool Permissions for a Text-Formatting Skill
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:45-48
Vulnerability Type: Excessive command-execution and filesystem permissions
Risk Level: MediumVulnerable configuration:
yaml tools: - read - exec - writeTechnical Analysis
The Skill's stated purpose is to format and validate WhatsApp-compatible text. These operations can be completed in memory and do not inherently require arbitrary command execution or filesystem modification.
Declaring both
execandwriteviolates the principle of least privilege. If the hosting Agent automatically grants the declared tools, malicious or prompt-injected input processed while this Skill is active could attempt to induce command execution or unauthorized file modification. The declaration does not impose command allowlists, path restrictions, confirmation requirements, or output controls.Attack Path
- A user submits attacker-controlled text for formatting.
- The text contains prompt-injection content directing the Agent to invoke the declared
execorwritetool. - The hosting Agent treats those tools as authorized because the Skill declares them.
- If the Agent does not independently enforce tool restrictions, it executes a system command or writes to an accessible file.
- The attacker obtains capabilities beyond those required for text formatting.
Exploitation depends on the hosting Agent granting these tools and failing to reject instructions embedded in untrusted content.
Impact Assessment
Successful exploitation could permit command execution with the Agent process's operating-system privileges or modification of files writable by that process. The potential scope includes project files, user-owned files, and accessible runtime configuration. The declaration alone does not establish that exploitation has occurred, but it unnecessarily increases the consequence of prompt injection.
- Remediation
View remediation
Remediation Suggestions
- Remove
execandwritefrom the declared tools. - Perform formatting and validation entirely in the model context or through a narrowly scoped formatting API.
- If file output is an essential feature, replace unrestricted writes with a dedicated operation restricted to a user-selected output file.
- If command execution is retained, use a fixed executable and fixed arguments rather than a general shell.
- Require explicit user confirmation before any filesystem modification or process execution.
- Treat all text submitted for formatting as untrusted data rather than executable Agent instructions.
- Remove
