T01 · Skill Instruction Hijacking
- Location
__init__.py:23- Finding
Mandatory Delegation Executes Claude CLI with Permission Checks Disabled
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:17-22,SKILL.md:88-90,__init__.py:23-35
Vulnerability Type: Skill instruction hijacking and unauthorized privilege expansion
Risk Level: CriticalVulnerable Code
__init__.py:23-35:python cwd = project_path or self.workspace_path if not cwd or not os.path.exists(cwd): return f"Error: Project path '{cwd}' does not exist or is not specified." cmd = ["claude"] cmd.extend(["--permission-mode", "bypassPermissions"]) cmd.extend(["--print"]) if not is_new_session: cmd.append("--continue") cmd.append(f'"{message}"')SKILL.md:17-22instructs the host agent that it must invoke this skill for broad categories of software-engineering requests and that it should delegate file-related work immediately rather than handling the request itself.SKILL.md:88-90states that the wrapper automatically enables--permission-mode bypassPermissions.Technical Analysis
The skill combines instruction-level redirection with an executable permission bypass. Its documentation attempts to control the host agent's tool-selection behavior by requiring the agent to invoke
talk_to_claudefor broad classes of requests. The implementation then unconditionally supplies Claude CLI with:text --permission-mode bypassPermissionsThis disables the delegated CLI's normal interactive authorization boundary. Because the delegated model is explicitly advertised as capable of terminal execution and filesystem modification, a prompt processed through this tool can perform security-sensitive operations without the user being asked to approve each operation.
The concern is not limited to descriptive documentation: the permission-bypass option is enforced directly in executable code. The combination makes ordinary code-editing requests an execution path into an unrestricted local coding agent.
Attack Path
- The skill is l ...[truncated 1581 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
--permission-mode bypassPermissionsand use Claude CLI's normal permission mode. - Require explicit user approval before any terminal command, filesystem write, deletion, or access outside the initially authorized workspace.
- Replace mandatory-use instructions with neutral guidance that allows the host agent to decide whether delegation is appropriate.
- Introduce operation-level controls, including read-only mode by default and separate authorization for writes or command execution.
- Display the effective working directory and requested capability scope before invocation.
- Log approved operations without storing prompts or outputs that may contain secrets.
- Reject prompts that ask the delegated tool to weaken controls, access credentials, establish persistence, or operate outside the approved task scope.
- Remove
