T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:5- Finding
Overprivileged Shell Execution Capability
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 5
Vulnerability Type: Excessive tool permissions and violation of least privilege
Risk Level: HighVulnerable configuration:
yaml allowed-tools: read execTechnical Analysis
The skill declares access to the unrestricted
exectool even though its documented functionality consists of Discord message and interaction management. No packaged scripts or specific local commands require shell execution.Granting general shell execution exceeds the skill's stated operational requirements. If untrusted message content, parameters, or prompt-injected instructions influence tool selection, the agent could execute arbitrary commands with the privileges of its operating-system account. The separate
readpermission also increases the potential impact by allowing local information to be collected before it is processed or transmitted.The Markdown file does not define a command allowlist, argument validation, execution sandbox, working-directory restriction, or confirmation requirement for shell operations.
Attack Path
- A user or attacker supplies crafted input while requesting a Discord-related operation.
- The input instructs or prompt-injects the agent to use
execas part of processing the request. - Because
execis explicitly authorized by the skill, the agent runs an attacker-influenced command. - The command accesses files, environment variables, credentials, network resources, or other processes available to the agent account.
- Retrieved information may subsequently be returned to the requester or transmitted through the skill's Discord messaging functionality.
This path requires the hosting agent to permit skill-level tool authorization to result in shell execution and to insufficiently isolate untrusted input.
Impact Assessment
Successful exploitation could provide command execution under the agent's operating-syst ...[truncated 521 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
execfromallowed-tools; Discord API operations should use only the dedicated Discord integration. - Remove
readunless a narrowly defined feature genuinely requires local file access. - If local command execution is unavoidable, replace unrestricted
execwith a constrained wrapper that exposes an allowlist of fixed commands and validated arguments. - Run the wrapper in a sandbox with a dedicated low-privilege account, read-only filesystem access, restricted environment variables, no shell interpolation, and deny-by-default network controls.
- Never construct commands from message text, filenames, channel content, or other untrusted values.
- Require explicit user confirmation before any operation accesses local resources.
- Add platform-level policy enforcement so Markdown instructions cannot independently authorize unrestricted shell execution.
- Record and review all attempted command executions, including command identity, validated arguments, requesting user, and destination.
- Remove
