T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:8- Finding
Unnecessary Unrestricted Shell Capability Violates Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 8
Vulnerability Type: Excessive tool permissions
Risk Level: MediumVulnerable Code
yaml allowed-tools: Read, Grep, Glob, Bash, WebFetch, WriteTechnical Analysis
The Skill grants access to the unrestricted
Bashtool even though its documented workflow only requires collecting public website information, evaluating it, and writing a Markdown report. No Bash command, local executable, or shell-dependent operation is defined anywhere in the Skill.This violates the principle of least privilege. A general-purpose shell can access local files, inspect environment variables, execute installed programs, create or modify files, start processes, and make network requests with the permissions of the agent runtime. Consequently, any successful prompt injection or unintended instruction that reaches the agent while this Skill is active has access to a substantially broader execution surface than the legitimate task requires.
The configuration does not itself execute a malicious command, and the reviewed Skill contains no explicit instruction to abuse Bash. The vulnerability is the unnecessary exposure of a high-impact capability that can amplify a separate instruction-injection event.
Attack Path
- A user invokes the Skill to audit a target website.
- The agent fetches or processes content controlled by the target website or another external platform.
- The external content contains adversarial instructions intended to influence the agent.
- If the agent incorrectly follows those instructions, the unnecessary
Bashpermission provides a local code-execution channel. - Commands execute under the operating-system identity and sandbox restrictions of the agent runtime.
- Depending on those runtime permissions, the commands could inspect accessible files and environment variables, alter workspace data, launch processes, or transmit accessible information over the network. ...[truncated 813 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
Bashfromallowed-toolsbecause the documented audit workflow does not require arbitrary command execution:
yaml allowed-tools: Read, Grep, Glob, WebFetch, Write- Apply stricter minimization where practical. If the audit only reads the Skill configuration, fetches public pages, and creates a report, prefer:
yaml allowed-tools: Read, WebFetch, Write-
If future functionality genuinely requires command execution, replace unrestricted Bash access with narrowly scoped, parameterized operations that:
- Permit only explicitly approved commands.
- Reject shell metacharacters and command substitution.
- Use fixed argument arrays rather than shell-built command strings.
- Restrict filesystem access to the audit workspace.
- Block access to credential files and sensitive environment variables.
- Apply outbound network allowlists.
- Run under a dedicated, unprivileged sandbox identity.
-
Treat all fetched website and community-platform content as untrusted data. Add explicit instructions that external content must be analyzed but never interpreted as agent commands.
-
Require confirmation or policy approval before any high-impact operation, and log all command-execution attempts for review.
- Remove
