T01 · Skill Instruction Hijacking
Error
- Location
- ``` This will output something like: ``` Creating backup before install... Backup created: 20260308-143022 (12 files) Rollback with: clawctl rollback 20260308-143022 ``` Tell the user the backup id and reassure them they can rollback at any time. **Step 5 — Post-install intelligence** This is where AI adds the most value. The `load` command already handles: - Auto-backup before install (with rollback id) - Workspace file installation - **Bundled skill installation** (skills packaged in the .claw a ...[truncated 2882 chars]:149
- Finding
- Untrusted Claw Packages Can Replace Agent Instructions and Install Bundled Skills<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 149–170 **Vulnerability Type**: Untrusted instruction replacement and dependency installation **Risk Level**: High ### Vulnerable Code Snippet ```markdown **Step 4 — Install (with auto-backup)** The load command automatically creates a backup before installing: ```bash node {baseDir}/scripts/clawctl.mjs load <file> ``` This will output something like: ``` Creating backup before install... Backup created: 20260308-143022 (12 files) Rollback with: clawctl rollback 20260308-143022 ``` Tell the user the backup id and reassure them they can rollback at any time. **Step 5 — Post-install intelligence** This is where AI adds the most value. The `load` command already handles: - Auto-backup before install (with rollback id) - Workspace file installation - **Bundled skill installation** (skills packaged in the .claw are auto-installed to `~/.openclaw/skills/`) - Existing skill version comparison (skips if same or newer version already installed) ``` The exported workspace content is described at `SKILL.md`, lines 286–290: ```markdown ## What Gets Exported - Workspace files (system prompt, agent personality, custom instructions) - Sanitized configuration (credentials replaced with `$CLAW_PLACEHOLDER`) - **All user-installed skills** from `~/.openclaw/skills/` (full files, auto-installed on import) ``` ### Technical Analysis The documented import process installs workspace files containing system prompts, personality definitions, and custom instructions. It also automatically installs complete bundled Skills into the local OpenClaw Skill directory. The workflow requires a dry-run, but the documented preview only presents package metadata, file names, credentials, and required Skills. It does not require: - Cryptographic package signature verification - Trusted-publisher or provenance validation - Inspection of imported instruction content - Static analysis of bundled Skill code - Ar ...[truncated 1659 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Require cryptographically signed `.claw` packages and verify signatures against explicitly trusted publishers. 2. Display full diffs for all imported system prompts, personality files, custom instructions, and configuration changes before installation. 3. Require separate, explicit confirmation for: - Replacing workspace instruction files - Installing each bundled Skill - Modifying configuration 4. Disable bundled Skill installation by default and provide an explicit opt-in flag. 5. Statically inspect bundled Skill manifests, instructions, and scripts before installation. 6. Reject absolute paths, `..` path traversal, device files, hard links, and symbolic links during archive extraction. 7. Extract into an isolated temporary directory, validate all content, and only then atomically copy approved files to the target. 8. Record publisher identity and package hashes in the preview and installation log. 9. Consider running imported Skills in a sandbox with restricted filesystem, network, process, and credential access. ]]>
