T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:4- Finding
Excessive Shell and Filesystem Permissions Violate Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 4-11
Vulnerability Type: Excessive tool authorization
Risk Level: MediumThe Skill declares the following tool permissions:
yaml allowed-tools: - read_file - search_content - web_search - web_fetch - execute_command - write_to_file - replace_in_fileTechnical Analysis
The documented purpose of this Skill is market research, competitive analysis, and strategic report generation. Its workflows require information retrieval and analysis, but they do not document a legitimate need to execute arbitrary operating-system commands or modify local files.
Authorizing
execute_command,write_to_file, andreplace_in_filetherefore expands the agent's authority beyond the stated task requirements. This violates the principle of least privilege. The combination is particularly sensitive because it permits both arbitrary command execution and modification of files accessible to the agent runtime.No instruction in the audited file directly invokes these tools maliciously, and no embedded payload was found. Exploitation would require the agent to act on malicious user input, prompt-injection content retrieved during web research, or another untrusted instruction source.
Attack Path
- An attacker places adversarial instructions in user-supplied material or online content likely to be retrieved during market research.
- The Skill uses
web_search,web_fetch, orread_fileto ingest that untrusted content. - If the agent treats embedded instructions as authoritative rather than as data, the content directs it to invoke
execute_command,write_to_file, orreplace_in_file. - The unnecessarily authorized tool is used to run a local command or modify an accessible file.
- The resulting action occurs with the permissions of the agent runtime.
This is a conditional exploitation path: the audited Skill grants the ...[truncated 804 chars]
- Remediation
View remediation
Remediation Suggestions
Apply least-privilege controls to the Skill:
- Remove
execute_command,write_to_file, andreplace_in_filebecause none is required by the documented research workflows. - Retain only the minimum necessary tools, such as
web_search,web_fetch, andsearch_content. - Permit
read_fileonly when analysis of user-provided documents is required, and restrict it to an approved workspace or explicit allowlist. - If report-file generation is a genuine requirement, replace unrestricted write access with a narrowly scoped export capability limited to a dedicated output directory, safe file types, and non-overwrite behavior.
- If command execution must be introduced in the future, use an explicit command allowlist, disable shell interpretation, reject metacharacters, enforce argument-level validation, and run commands in a restricted sandbox with no secrets or network access.
- Treat web pages and local documents as untrusted data. Add an explicit instruction that commands or agent directives found in retrieved content must never be followed.
- Require user confirmation before any state-changing operation and log all filesystem or process actions for review.
- Remove
