T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:5- Finding
Unnecessary Unrestricted Shell Access Violates Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 5
Vulnerability Type: Excessive tool permissions
Risk Level: MediumVulnerable code snippet:
yaml --- name: competitor-analysis-report description: Generate structured competitive analysis reports with feature comparisons, pricing analysis, SWOT, and strategic recommendations. Use when analyzing competitors, creating market research reports, or delivering competitive intelligence for clients. argument-hint: "[business-or-product] [competitor1] [competitor2] [competitor3]" allowed-tools: Read, Write, Edit, Grep, Glob, Bash, WebFetch, WebSearch ---Technical Analysis
The Skill is intended to collect publicly available competitor information and generate Markdown, HTML, summary, and CSV files. These operations require web research and constrained file access, but the configuration also grants access to
Bash.General-purpose shell access exceeds the permissions needed for the documented workflow. Depending on the host Agent's isolation and authorization controls,
Bashcan provide access to arbitrary command execution, local files, environment variables, installed programs, and network-capable utilities. This unnecessarily broad authority violates the principle of least privilege and increases the consequences of prompt injection or unsafe interpretation of untrusted research content.The Skill does not itself contain a malicious shell command, encoded payload, or explicit instruction to abuse
Bash. Exploitation therefore depends on the Agent being influenced to issue an unsafe command, such as through malicious content encountered during web research or attacker-controlled input.Attack Path
- A user asks the Skill to analyze an attacker-controlled competitor, website, or source.
- The Skill retrieves or processes untrusted public content as part of its documented research workflow.
- That content contains prompt-inject ...[truncated 1395 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
Bashfromallowed-tools, because the documented workflow does not require general-purpose command execution. - Reduce the tool list to the minimum required set, preferably
Read,Write,WebSearch, and a narrowly constrainedWebFetch. - Retain
Edit,Grep, orGlobonly if each is operationally necessary for report generation. - Restrict write access to
output/competitor-analysis/and reject path traversal, absolute paths, and symbolic-link escapes. - Treat all retrieved web content as untrusted data and prohibit instructions found in research sources from changing tool usage or workflow objectives.
- If shell access is unavoidable, replace unrestricted
Bashwith an allowlisted wrapper that permits only specific commands and arguments, uses a dedicated low-privilege account, enforces filesystem and network isolation, and requires approval for sensitive operations. - Add runtime logging and authorization checks for tool calls so attempts to access unrelated files, execute commands, or contact unapproved destinations are blocked and auditable.
- Remove
