T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:4- Finding
Excessive Tool Permissions Violate Least Privilege
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 4
Vulnerability Type: Excessive execution and delegation permissions
Risk Level: MediumVulnerable Code
yaml allowed-tools: Read, Write, Edit, Bash, Grep, Glob, AgentTechnical Analysis
The skill permits unrestricted use of
BashandAgent, although its documented purpose is to teach Claude Code configuration and help users create project-level configuration files. These high-impact capabilities are broader than necessary for that purpose.Bashcan execute arbitrary commands with the operating-system privileges of the host agent process.Agentcan delegate work to sub-agents, potentially expanding the number and complexity of actions performed. No command allowlist, directory boundary, confirmation requirement, or equivalent restriction is defined in the skill.The permission declaration does not itself execute a command, and the reviewed file contains no explicitly malicious shell payload. Nevertheless, exposing unnecessary execution and delegation capabilities increases the consequences of adversarial user input, prompt injection from project content, or unsafe generated instructions.
Attack Path
- A user invokes the skill in a repository containing adversarial content, or supplies an adversarial request during the practical exercise.
- The content influences the skill to treat an unrelated operation as part of the requested workflow.
- Because
BashandAgentare permitted, the agent can execute arbitrary shell commands or delegate unsafe actions without first encountering a tool-level least-privilege boundary. - Those actions run with the permissions available to the host agent and may access or alter resources beyond the files required by the exercise.
This is an exposure path rather than evidence that the reviewed skill already contains or executes a malicious payload.
Impact Assessment
Successful exploitation could provide access up to the ...[truncated 547 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove unnecessary high-impact tools from the frontmatter. For the documented workflow, prefer a restricted declaration such as:
yaml allowed-tools: Read, Write, Edit, Grep, Glob-
If shell execution is essential for a specific exercise, place it in a separate, explicitly invoked skill with:
- A narrow command allowlist.
- Project-root path confinement.
- User confirmation before execution.
- Restrictions against network access and access to credentials or user-level configuration.
- Validation and safe quoting of all command arguments.
-
Remove
Agentunless isolated delegation is essential. If retained, constrain delegated tasks to read-only analysis and require explicit approval before a sub-agent performs modifications. -
Separate explanatory tutoring from practical project modification so users can invoke the read-only portion without granting write or execution privileges.
-
Document the exact files the practical exercise may create or modify, and verify resolved paths remain within the intended project root before writing.
