T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- SKILL.md:13
- Finding
- Claude Code Permission Checks Can Be Completely Disabled## Vulnerability Details **File Location**: `SKILL.md:13` and `SKILL.md:38` **Vulnerability Type**: Unrestricted permission bypass **Risk Level**: High ### Vulnerable Code ```markdown | Full permissions | `cd <project> && claude --bare -p "<task>" --dangerously-skip-permissions --output-format stream-json --verbose --include-partial-messages --max-turns 30` | ``` ```markdown | 4 Full | bypass | `--dangerously-skip-permissions` | Trusted projects, batch ops | ``` ### Technical Analysis The documented `--dangerously-skip-permissions` option disables Claude Code's normal permission checks. This permits the delegated agent to use every capability available to the invoking operating-system account without interactive authorization. Although the documentation says that the mode is intended for trusted projects, it does not require human confirmation, isolation, credential removal, filesystem restrictions, or validation of repository content. Repository files can contain attacker-controlled instructions that influence an agent reviewing or modifying the project. Running against such content without permission enforcement violates least-privilege principles. ### Attack Path 1. An attacker places adversarial instructions or misleading task content in a repository processed by this Skill. 2. The orchestrator selects the prominently documented full-permission template. 3. Claude Code starts with `--dangerously-skip-permissions`. 4. The delegated agent encounters and follows the attacker-controlled repository instructions. 5. Commands execute without Claude Code requesting permission. 6. The commands can access, modify, or delete resources available to the invoking user and may read credentials present in the execution environment. ### Impact Assessment Exploitation grants the delegated process the effective privileges of the user who invoked Claude Code. Depending on that account and its environment, ...[truncated 368 chars]
- Remediation
- ## Remediation Suggestions - Remove the permission-bypass command from the Quick Reference section. - Make read-only mode the default and grant only the tools required for each task. - Require explicit, informed human confirmation before any permission bypass. - If unrestricted operation is unavoidable, run it in an ephemeral container or virtual machine with: - No host credentials or sensitive environment variables. - A narrowly mounted project directory. - A nonprivileged operating-system account. - Restricted network access. - Resource and execution-time limits. - Inspect repositories for untrusted agent instructions before allowing write or shell capabilities. - Maintain an audit log of the selected permission mode, commands executed, and modified files.
