T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:22- Finding
Excessive and Unconstrained Agent Tool Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:22-26; related behavior declarations atSKILL.md:66-67,SKILL.md:202,SKILL.md:209-211, andSKILL.md:224
Vulnerability Type: Excessive permissions and violation of least privilege
Risk Level: HighThe Skill requests broad file-system and command-execution tools:
yaml tools: - read - exec - write - globIt also declares that the Agent may construct API requests from user input, send HTTP requests to a target endpoint, process files, and execute system commands. The document mentions command allowlisting and sandboxing only as recommendations; it does not define or enforce an allowlist, restricted file paths, permitted command arguments, or an outbound network destination. It also suggests administrator execution as a response to permission errors.
Technical Analysis
The stated web-search function needs controlled network access to a known Bailian service. It does not inherently require unrestricted local file reads, arbitrary file writes, recursive path discovery, or general-purpose system command execution.
Granting
read,write,glob, andexectogether creates a broad capability chain:globcan discover files available to the Agent.readcan access discovered files, including potentially sensitive configuration data.execcan invoke system commands with the Agent process's privileges.writecan modify accessible files or create command inputs.- Network request behavior can provide a channel through which accessed information may be transmitted.
The Skill accepts a user-controlled
instructionparameter but does not define strict validation or separation between search terms, command arguments, file paths, and network destinations. Although no malicious command or implemented exfiltration payload was found, the combination of user-controlled instructions and unconstrained privileged tools violat ...[truncated 1735 chars]- Remediation
View remediation
Remediation Suggestions
- Remove
exec,write,read, andglobunless each capability is demonstrably necessary for the web-search workflow. - Replace general-purpose command execution with a dedicated HTTP client tool that exposes only the required Bailian operation.
- Define the exact official HTTPS endpoint and enforce an outbound hostname allowlist. Reject redirects to unapproved hosts.
- Use a fixed request schema. Treat user input only as search data and never interpolate it into shell commands, headers, URLs, or file paths without strict validation.
- If file access is required, restrict it to a dedicated workspace directory, prevent path traversal and symbolic-link escapes, and use read-only access whenever possible.
- If command execution cannot be removed, enforce a small executable allowlist, fixed argument schemas, shell-free process invocation, timeouts, output limits, and a low-privilege sandbox.
- Remove the recommendation to run as administrator. Fail safely when required permissions are unavailable.
- Add explicit controls for API-key redaction, response-size limits, request timeouts, TLS verification, logging sanitization, and user confirmation before sensitive operations.
- Document the minimum required permissions and add tests proving that unrelated files, commands, and network destinations cannot be accessed.
- Remove
