T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:25- Finding
Excessive and Mismatched Tool Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 25–28
Vulnerability Type: Least-privilege violation and capability mismatch
Risk Level: MediumVulnerable Code:
yaml tools: - read - exec - writeTechnical Analysis
The skill declares local filesystem read and write capabilities as well as arbitrary command execution. These permissions are not required for its documented purpose, which is limited to sending, replying to, reading, and reacting to Discord messages through the
messagetool.The declared capabilities therefore do not match the documented workflows. In particular, the skill requests
read,write, andexec, while themessagecapability used throughout its examples is absent from the declaration. Granting unnecessary local capabilities violates the principle of least privilege and expands the consequences of malicious, misleading, or untrusted input.No direct malicious command or confirmed exploitation payload is present in the audited file. The risk arises from the unnecessarily broad permissions made available when the skill is loaded or invoked.
Attack Path
- An agent loads the skill and grants its declared
read,write, andexeccapabilities. - The skill processes attacker-controlled user input or untrusted content obtained from a Discord channel.
- Crafted content induces the agent to perform an operation outside the legitimate Discord messaging scope.
- Because the skill has unnecessary local capabilities, the induced operation may read local files, modify accessible data, or execute a local command.
- The operation runs with the permissions of the hosting agent process, extending the potential impact beyond Discord.
Impact Assessment
Successful exploitation could permit access to files readable by the agent process, modification of files writable by that process, or execution of commands under the agent's operating-system ide ...[truncated 357 chars]
- An agent loads the skill and grants its declared
- Remediation
View remediation
Remediation Suggestions
- Remove
read,write, andexecfrom the skill's tool declaration. - Declare only the Discord
messagecapability required by the documented workflows. - Restrict messaging operations to explicitly authorized Discord servers and channels where supported.
- Apply action-level controls so the skill can perform only the documented send, reply, read, and reaction operations.
- Require confirmation for operations involving destinations not explicitly supplied or approved by the user.
- Treat Discord messages and other external content as untrusted data and prevent them from authorizing tool calls or changing the skill's operational scope.
- If a future feature genuinely requires local file or command access, isolate it into a separately reviewed capability with narrow path, command, argument, and runtime restrictions.
- Remove
