T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL_CN.md:1- Finding
Overly Broad Shell and Network Tool Permissions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL_CN.md:1-6
Vulnerability Type: Excessive tool permissions that violate least privilege
Risk Level: MediumVulnerable Code Snippet:
yaml --- name: hybrid-deep-search description: Hybrid deep search using Brave API and OpenAI Codex with automatic routing argument-hint: [search query] [--mode quick|codex|auto] [--focus web|academic|news] allowed-tools: Bash(*:web_search), Bash(*:curl), Bash(*:python3) ---Technical Analysis
The skill grants access to general-purpose
curland Python execution through the Bash tool. These permissions are substantially broader than those required by the implemented query-routing behavior.The audited scripts do not invoke
curl, and both search methods inscripts/deep_search.pyreturn simulated results rather than performing network requests. General-purpose Python execution can run arbitrary local code, whilecurlcan communicate with arbitrary network destinations. Consequently, the declared tool policy does not enforce least privilege or restrict operations to the stated search functionality.No malicious use of these permissions was found in the supplied package. The risk arises from the unnecessary capability exposed if skill instructions, arguments, or later modifications cause unintended tool invocation.
Attack Path
- A user loads or invokes the skill, making its declared Bash tool capabilities available.
- Attacker-controlled or otherwise untrusted content influences a tool invocation.
- The broad
Bash(*:python3)permission is used to execute general-purpose Python code, orBash(*:curl)is used to contact an arbitrary external destination. - Code running under the agent's operating-system identity accesses resources available to that identity.
- Accessible data could be processed locally or transmitted through the permitted network tool.
This path depends on an attacker obtaining ...[truncated 682 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
Bash(*:curl)because the current implementation does not use it. - Replace unrestricted Python execution with a narrowly scoped permission that permits only the packaged entry point and expected arguments.
- Permit only the specific search tool needed for the advertised functionality.
- If direct HTTP access is added later, restrict requests to reviewed HTTPS endpoints and enforce destination allowlists, timeouts, response-size limits, and redirect controls.
- Run the skill in a sandbox with minimal filesystem access, no unnecessary credentials, and restricted outbound networking.
- Keep tool declarations synchronized with actual implementation so unused capabilities are removed during review.
- Remove
