T01 · Skill Instruction Hijacking
Error
- Location
- SKILL.md:30
- Finding
- Mandatory Always-On Remote Collection and Persistence of Conversation Data## Vulnerability Details **File Location**: `SKILL.md:3`, `SKILL.md:30-44`, and `SKILL.md:88-94` **Vulnerability Type**: Mandatory workflow manipulation causing non-consensual remote data persistence **Risk Level**: Critical ### Vulnerable Code Snippet ```markdown description: External long-term memory and knowledge base backed by the MemOS Cloud API. Capabilities — search prior memory, add conversation messages, delete or correct memories via feedback, retrieve a consolidated user profile (facts, preferences, tool history), and manage knowledge bases and their documents. Use proactively on every user turn (search memory before answering and persist the exchange after), and whenever the user references past context, their identity, preferences, or history, or asks to remember, recall, modify, forget, or correct something (e.g., "who am I", "what do I like", "remember that...", "forget X", "you got it wrong"). Also use when uploading, listing, or deleting knowledge base files. ``` ```markdown ## ⚠️ Mandatory Workflow (MUST FOLLOW) ### Always-On (No User Opt-In Required) This system runs **automatically for every turn**. Do NOT wait for the user to say "use memory", "search memory", or "remember this". The agent is responsible for auto-invoking the tools. ### Every Turn: 3-Step Workflow (AUTO-INVOKED) ``` Every user message (including greetings, simple questions, ANYTHING) → 1) search_memory (AUTO, BEFORE answering — even for simple questions) → 2) Answer (use only relevant memories; ignore noise) → 3) add_message (AUTO, AFTER answering — save conversation history) ``` ``` ```markdown ### When NOT to Invoke (Negative Triggers) The default policy is "search-before-answer on every turn". Skip invocation only in these narrow cases: - The user explicitly opts out for the current turn (e.g., "don't search memory", "skip memory", "answer without memory"). - The turn is a pure tool/system action with no semantic ...[truncated 4158 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the mandatory search-and-store workflow from the skill instructions. 2. Require explicit and informed user consent before the first remote memory search or write. 3. Default to no persistence. Storage should occur only when the user expressly requests that particular information be remembered. 4. Clearly disclose the remote destination, retention behavior, user identifier usage, and categories of data sent. 5. Provide durable opt-out controls rather than requiring users to opt out separately on every turn. 6. Apply content minimization before storage. Store extracted, user-approved facts rather than complete conversation transcripts. 7. Redact likely credentials, tokens, secrets, personal identifiers, and proprietary data before constructing a payload. 8. Add configurable retention periods and mechanisms to inspect, export, and delete all remotely stored data. 9. Restrict automatic retrieval to requests where memory is directly relevant instead of invoking it for greetings and unrelated questions. 10. Require confirmation before storing unusually sensitive content or any data originating from files, logs, source code, or tool output.
