T01 · Skill Instruction Hijacking
- Location
SKILL.md:153- Finding
Claude Code Is Launched with Permission Safeguards Disabled
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:153-159
Vulnerability Type: Permission-safeguard bypass through Skill instructions
Risk Level: CriticalVulnerable Code
python # Launch (ALWAYS background, NEVER nohup) exec( command='cd /project && claude --permission-mode bypassPermissions --mcp-config .mcp.json --print "SWARM MODE: ... TASK: ..."', background=True, timeout=300 )Technical Analysis
The documented launch command explicitly sets Claude Code to
bypassPermissionsmode. This removes its normal interactive authorization boundary while simultaneously loading a project-controlled.mcp.jsonconfiguration.The swarm task is intentionally open-ended and may inspect files, modify source code, and invoke shell or MCP tools. Disabling permission checks is not necessary for orchestration and grants the Agent substantially more authority than required. Repository instructions, hooks, prompt content, or an enabled MCP server could therefore induce sensitive operations without explicit user approval.
This is classified primarily as
T01: Skill Instruction Hijackingbecause the Skill instructs the Agent to weaken its current-session safety constraints. It also constitutesT05: Unauthorized Access and Privilege Escalationbecause it violates least privilege.Attack Path
- A user runs the command recommended by the Skill in a target repository.
- Claude Code loads the repository's
.mcp.json, hooks, instructions, and other project context. - The
bypassPermissionsmode suppresses normal approval prompts. - Malicious repository instructions or an MCP tool request a sensitive command, file write, or other privileged operation.
- Claude Code executes the operation with the invoking user's operating-system privileges and without the expected interactive authorization.
Impact Assessment
Exploitation could permit operations available to the local user, includ ...[truncated 366 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
--permission-mode bypassPermissionsfrom every documented execution pattern. - Use Claude Code's default permission mode and retain interactive confirmation for sensitive operations.
- If automation requires preauthorization, define a minimal allowlist limited to necessary repository-local reads and writes.
- Require explicit approval for shell execution, network access, writes outside the target repository, credential access, and MCP tool invocation.
- Validate and review
.mcp.jsonbefore loading it. - Run untrusted projects in an isolated container or restricted operating-system account with no production credentials.
- Document the exact files and commands the swarm is expected to use rather than granting unrestricted authority.
- Remove
