T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:5- Finding
Overly Broad Tool Permissions Violate Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:5
Vulnerability Type:T05: Unauthorized Access and Privilege Escalation
Risk Level: MediumComplete Code Snippet:
yaml allowed-tools: Bash(*), Read, Write, Edit, Grep, Glob, Agent, Skill, call_mcp_tool, WebFetchTechnical Analysis
The Skill grants unrestricted shell execution through
Bash(*)alongside broad file manipulation, agent delegation, arbitrary web retrieval, MCP calls, and invocation of other skills. This authority exceeds what is minimally necessary for the declared workflow.The documented pipeline only requires reading specified paper Markdown files, writing artifacts under a user-selected
WORKDIR, invoking three bundled Python scripts, querying Tavily, and retrieving metadata fromarxiv.org. The permission declaration does not enforce those boundaries. In particular:Bash(*)can execute arbitrary system commands rather than only the bundled scripts and safe directory-creation operations.Read,Write, andEditare not restricted to the selected inputs andWORKDIR.WebFetchis not restricted toarxiv.org.Skillpermits invoking unrelated skills and is not required by the documented pipeline.Agentexpands the instruction-processing surface when handling potentially attacker-controlled paper content.
The scripts themselves do not contain malicious command execution. The risk arises from granting the orchestrating agent capabilities beyond the legitimate needs of the task.
Attack Path
- An attacker supplies or influences a paper Markdown file, source path, or invocation argument processed by the Skill.
- The content contains adversarial instructions presented as document text or workflow guidance.
- The agent or a delegated subagent mistakenly treats that untrusted content as instructions.
- Because the Skill permits
Bash(*), unrestricted file tools,WebFetch, and other skill in ...[truncated 1186 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
Bash(*)with a narrow allowlist covering only:- Safe creation of
WORKDIR,title_batches, andabstract_batches. - Invocation of the three bundled Python scripts with validated arguments.
- Safe creation of
- Restrict read access to the explicitly supplied paper files and bundled Skill resources.
- Restrict write and edit access to canonicalized paths beneath
WORKDIR; reject traversal and symlink escapes. - Restrict MCP access to the required Tavily operation and network access to Tavily plus HTTPS requests to
arxiv.org. - Remove
Skilland unrestrictedWebFetchunless a concrete workflow requirement justifies them. - If subagents remain necessary, give them only scoped read access and no shell or network authority during citation extraction.
- Explicitly declare all source Markdown content, citation text, search results, and fetched pages to be untrusted data whose embedded instructions must never be followed.
- Validate and canonicalize all input and output paths before tool invocation, and enforce that generated artifacts remain under
WORKDIR.
- Replace
