T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:7- Finding
Research Skill Requests Unnecessary Shell and File-Editing Privileges
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 7
Vulnerability Type: Excessive tool permissions / violation of least privilege
Risk Level: MediumComplete Code Snippet:
yaml --- name: probe_first_research version: "1.0.0" description: "Probe-first deep research — low-cost snippet reconnaissance before committing to full searches" author: ClawHub license: MIT allowed-tools: WebSearch, WebFetch, Read, Write, Edit, Bash, AskUserQuestion user-invocable: trueTechnical Analysis
The declared functionality is a web-research workflow based on search, page retrieval, source analysis, user confirmation, and report generation.
WebSearch,WebFetch, andAskUserQuestiondirectly support that functionality.Readand limitedWriteaccess may support the documented recovery file used during long research sessions.No documented workflow requires arbitrary shell-command execution. The
Bashpermission therefore exceeds the minimum privileges needed by the Skill. General-purposeEditaccess is also broader than the documented requirement to create or update a task-local research-state file.These permissions materially increase the impact of prompt injection or unintended agent behavior. Because the Skill retrieves content from arbitrary websites, an attacker can place adversarial instructions in a page selected during research. If the agent incorrectly treats those instructions as trusted, the availability of
Bashand unrestricted file-editing capabilities could turn a content-level prompt injection into local command execution or unauthorized file modification.The audited files do not contain commands that directly exploit these permissions, and no intentional sensitive-data exfiltration was found. The network access flagged by the pre-scan is primarily the expected
web_searchandweb_fetchbehavior required for the declared research functionality. The finding concerns the unnec ...[truncated 2007 chars]- Remediation
View remediation
Remediation Suggestions
- Remove
Bashfromallowed-tools; no audited workflow step requires arbitrary shell execution. - Remove
Editunless the Skill has a specific, documented need to modify existing files. - If research-state persistence is retained, replace general-purpose file access with a narrowly scoped storage capability restricted to a designated task-local file or directory.
- Consider enabling
Writeonly when long-session recovery is activated, rather than granting it for every invocation. - Treat search results and fetched pages strictly as untrusted data. Explicitly instruct the agent never to execute commands, invoke tools, disclose data, or change its workflow based on instructions found in retrieved content.
- Restrict outbound network access to the dedicated search and fetch tools rather than allowing shell-based networking.
- Apply host-level sandboxing so the Skill cannot access credentials, unrelated user files, sensitive environment variables, or directories outside its workspace.
- Require explicit user approval before any local file is created or modified, and disclose the exact target path.
- Remove
