T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:23- Finding
Excessive Tool Permissions for a Text-Generation Skill
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 23-26
Vulnerability Type: Excessive read, write, and command-execution permissions
Risk Level: MediumVulnerable configuration:
yaml tools: - read - exec - writeTechnical Analysis
The skill is documented as a live-stream script generator whose primary function is producing text from user-supplied product, audience, and topic information. This function does not inherently require arbitrary filesystem access or operating-system command execution.
Nevertheless, the skill requests
read,write, andexeccapabilities. In particular,execcan provide access to system commands, whilereadandwritemay expose or modify files available to the hosting agent. This violates the principle of least privilege and unnecessarily increases the consequences of prompt injection, malicious user input, agent misuse, or future changes to the skill instructions.The document includes general guidance stating that only allowlisted commands should be executed and that user input should not be concatenated into command-line arguments. However, no enforceable command allowlist, path restriction, argument validation mechanism, or execution sandbox policy is defined in the reviewed project. The package contains only
SKILL.md, so there is no local implementation demonstrating that these restrictions are technically enforced.Attack Path
- The hosting agent loads the skill and grants the tool capabilities declared in its metadata.
- An attacker supplies crafted content to the live-stream script workflow, potentially containing prompt-injection instructions.
- The crafted input attempts to persuade the agent to use the unnecessary
read,write, orexeccapability rather than merely generate text. - If the agent does not independently enforce strict tool authorization, it may read accessible files, overwrite files, or execute commands under ...[truncated 958 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
exec,read, andwritefrom the declared tools if the skill only generates live-stream text. - Declare only the minimum capability required by the host platform, ideally no external tools for ordinary text generation.
- If file-based input or output is essential, replace broad filesystem access with a narrowly scoped interface restricted to a dedicated workspace directory.
- If command execution is genuinely required for a documented feature, expose fixed operations through a constrained wrapper rather than granting general
execaccess. - Enforce a command allowlist, fixed executable paths, strict argument schemas, timeout and resource limits, shell-free process invocation, and rejection of user-controlled command fragments.
- Run the skill in a sandbox under a low-privilege account with no access to credentials, sensitive environment variables, private keys, or unrelated project files.
- Require explicit user confirmation before any filesystem mutation or command execution.
- Add automated tests verifying that untrusted content cannot trigger tool calls and that generated responses cannot reveal local files or environment values.
- Remove
