T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:34- Finding
Unnecessary and Undefined Command-Execution Capability
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:34-36; related command instructions atSKILL.md:89,SKILL.md:110-128, andSKILL.md:149-167
Vulnerability Type: Excessive tool permissions and ambiguous command execution
Risk Level: MediumVulnerable Code
yaml tools: - read - execThe skill subsequently directs the agent to execute commands without defining a safe implementation or constrained command mapping:
text When user asks about TokenSaver in natural language, interpret and execute:text **Action:** Execute /tokensave commandtext **Action:** Execute /tokenbalance commandtext **Action:** Execute /tokenquality commandtext **Action:** Execute /tokenoff commandtext **Action:** Execute /tokenreport commandtext **Action:** Execute /tokens commandtext **Action:** Execute /tokencache clear commandTechnical Analysis
The Markdown-only skill requests the unrestricted
exectool even though its documented purpose is to manage conversational token optimization settings, reports, and cache state. The package contains no executable implementation, command definitions, argument schema, shell wrapper, or allowlist demonstrating why operating-system command execution is required.The instructions repeatedly tell the agent to “execute” slash commands, but do not specify that these are internal state transitions rather than shell commands. In an agent runtime that resolves unknown commands through
exec, this ambiguity could cross the boundary between conversational command handling and local process execution.This violates the principle of least privilege: a skill limited to response formatting and internal session-state management should not receive general command-execution authority. The audit did not identify an embedded payload or a direct command-injection expression, so this findi ...[truncated 1606 chars]
- Remediation
View remediation
Remediation Suggestions
-
Remove
execfrom the declared tool list because the documented functionality does not require operating-system command execution:yaml tools: - read -
Replace every “Execute
/command” instruction with an explicit internal state operation, such as:text Update the session-local TokenSaver mode to "aggressive". Do not invoke a shell, subprocess, external program, or operating-system command. -
Define a structured, non-shell command dispatcher with a closed allowlist for supported operations:
set_mode("aggressive")set_mode("balanced")set_mode("quality")set_enabled(false)get_status()get_report()clear_cache()
-
If local execution is genuinely necessary, provide an auditable implementation and enforce:
- Fixed executable paths.
- Fixed or strictly validated arguments.
- Rejection of shell metacharacters and arbitrary trailing input.
- Direct process invocation without a shell.
- A restricted service account and filesystem sandbox.
- Explicit user confirmation for consequential operations.
- Logging of every execution request and result.
-
Document whether the reported statistics are measured values or examples. Do not present fixed template values as actual runtime telemetry.
-
