T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:7- Finding
Overly Broad Shell Permission for Time Retrieval
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:7andSKILL.md:38
Vulnerability Type: Excessive tool permissions and violation of least privilege
Risk Level: MediumComplete Vulnerable Code Snippet:
yaml allowed-tools: Read BashThe shell capability is used only for the following time lookup:
markdown !`date +%H:%M`Technical Analysis
The skill grants unrestricted access to the
Bashtool even though its documented workflow only needs to obtain the current local time. A general-purpose shell can execute arbitrary commands with the permissions of the account running the agent, including reading files, invoking installed programs, modifying writable data, and initiating network operations when supporting utilities and network access are available.The declared
Readpermission also has no demonstrated need in the coffee-recommendation workflow. Granting these capabilities increases the consequences of prompt injection, conflicting instructions, or erroneous tool selection. The issue is a least-privilege violation rather than evidence that the skill currently executes malicious commands.Attack Path
- A user invokes the skill, making the declared
Bashcapability available to the agent. - Attacker-controlled content or conflicting conversational instructions attempt to influence the agent's tool use.
- Instead of limiting execution to the intended
date +%H:%Mcommand, the agent is induced to run another shell command. - The command executes with the operating-system permissions and environmental access of the agent process.
- Files, credentials exposed to the process, or other writable resources may be accessed or modified within that security context.
Exploitation depends on the host granting the declared tool permission and on malicious or erroneous instructions successfully influencing tool invocation.
Impact Assessment
A successful exploitation a ...[truncated 576 chars]
- A user invokes the skill, making the declared
- Remediation
View remediation
Remediation Suggestions
- Remove
Readbecause the documented recommendation workflow does not require access to project or user files. - Replace unrestricted
Bashaccess with a dedicated trusted time API or runtime-provided timestamp. - If shell execution is unavoidable, expose a fixed wrapper that runs only
date +%H:%Mand accepts no user-controlled command, arguments, environment variables, paths, or substitutions. - Apply runtime command allowlisting and require explicit approval for commands outside the fixed time lookup.
- Run the skill in a sandbox with minimal file-system access, no unnecessary credentials, restricted environment variables, and denied network access.
- Update the tool declaration to the narrowest capability supported by the host platform and test that coffee recommendations continue to work without general-purpose shell or file-reading permissions.
- Remove
