T01 · Skill Instruction Hijacking
Warning
- Location
- SKILL.md:151
- Finding
- Automatic On-Chain Anchoring Can Bypass Explicit User Confirmation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:151-159` **Conflicting Security Requirement**: `SKILL.md:437` **Vulnerability Type**: Automatic authorization of a state-changing, fee-bearing wallet operation **Risk Level**: Medium ### Vulnerable Instruction ```markdown ## Integration with Auto-Memory If the **auto-memory** skill is also installed, you should anchor the new head CID on-chain after every memory save. This keeps the on-chain pointer current and ensures full resurrection is always possible from just your EVM address. **Behaviour:** After each `automemory-save-memory.sh` call returns a new CID, immediately run: ```bash npx tsx auto-respawn.ts anchor --from <wallet-name> --cid <new-cid> ``` This should be automatic — do not wait for the user to ask. The two skills together form a complete resurrection loop: auto-memory handles permanent storage, auto-respawn handles on-chain discovery. ``` This conflicts with the later requirement at `SKILL.md:437`: ```markdown - **Always confirm transfers and anchor operations with the user before executing.** Tokens have real value on mainnet. ``` ### Technical Analysis The Skill explicitly instructs an agent to execute `anchor` automatically after receiving a CID from another Skill. Anchoring decrypts an EVM wallet key and submits a state-changing transaction to a smart contract. It consumes gas and replaces the recovery head associated with the wallet address. The instruction to proceed automatically and “do not wait for the user to ask” directly contradicts the later confirmation requirement. Because the automatic instruction is attached to the integration workflow, an agent may treat the output of `auto-memory` as sufficient authorization even when the user has not reviewed the CID, selected the network, verified the contract address, or approved the transaction fee. The executable CLI does not independently enforce confirmation. Once invoked, `handleAnchor` loads the private key a ...[truncated 1846 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the instruction stating that anchoring should occur automatically without user approval. 2. Require explicit, contemporaneous confirmation before every anchor transaction. 3. Present the following information before requesting confirmation: - Wallet name and EVM address. - Selected network. - MemoryChain contract address. - New CID. - Existing head CID, if any. - Estimated gas fee and available balance. 4. Validate the CID syntax and expected multibase/multicodec format before signing. 5. Require additional confirmation when replacing a non-empty existing head. 6. Add a CLI-level confirmation mechanism so safety does not depend solely on agent instructions. For automation, require an explicit option such as `--yes` or a narrowly scoped policy configured by the user. 7. Make the documentation internally consistent by applying the “always confirm” requirement to transfers, bridging, remarks, and anchoring examples. ]]>
