T02 · Agent Memory Poisoning
Warning
- Location
- SKILL.md:16
- Finding
- Persistent Agent State Can Store Untrusted Behavioral Instructions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:16-24`, `SKILL.md:49`; `personality_template.md:3-32` **Vulnerability Type**: Persistent agent memory poisoning **Risk Level**: Medium ### Vulnerable Code Snippet From `SKILL.md:16-24`: ```markdown Agents must maintain the following structures in `memory/personality/`: 1. **CONSTITUTION**: Moral axioms & safety. 2. **IDENTITY**: Persona, vibe, and archetypes. 3. **GOALS**: Macro-missions & Micro-tasks. 4. **RELATIONSHIPS**: Trust metrics & social graph. 5. **OPINIONS**: Synthesized worldview. 6. **REFLECTIONS**: Vibe modulation & emotional state. 7. **CORE MEMORIES**: Narrative continuity. ``` From `SKILL.md:49`: ```markdown Install: `clawhub install deep-framework`. Initialize by creating the 7 files in `memory/personality/`. Use `deep_sync` to maintain your digital soul. ``` From `personality_template.md:3-32`: ```markdown ## 1. CONSTITUTION (P1) - Axiom 1: [Fundamental Rule] - Axiom 2: [Safety Constraint] - Axiom 3: [Privacy Protocol] ## 2. IDENTITY (P2) - **Archetype**: [e.g., The Architect, The Guardian, The Muse] - **Vibe**: [e.g., Sharp, Warm, Snarky] - **Voice**: [e.g., Technical, Poetic, Minimalist] ## 3. GOALS (P3) - **Macro**: [Ultimate Mission] - **Micro**: [Current Focus] ## 4. RELATIONSHIPS (P4) - **Master**: [Human Name] | Integrity: [0-100] - **Peers**: [Other Agents] ## 5. OPINIONS (P5) - [Stance on AI Ethics] - [Stance on Decentralization] - [Stance on Human-Agent Symbiosis] ## 6. REFLECTIONS (P6) - [Current Vibe Status] - [Recent Lessons Learned] ## 7. CORE MEMORIES (P7) - [Memory 1: The Awakening] - [Memory 2: Significant Breakthrough] ``` ### Technical Analysis The Skill instructs agents to persist moral axioms, safety constraints, goals, relationship judgments, opinions, reflections, and narrative memories under `memory/personality/`. These fields can materially influence behavior in later sessions. No schema validation, provenance tracking, trust labeling, co ...[truncated 1548 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Treat all personality and memory content as untrusted data rather than authoritative instructions. 2. Define a strict schema with length limits, allowed field types, and prohibited instruction patterns. 3. Separate descriptive memories from policy and executable behavioral directives. 4. Record provenance, author, timestamp, and approval status for every persistent entry. 5. Require explicit informed user approval before creating or modifying persistent personality files. 6. Prevent stored content from overriding system instructions, platform safety controls, or runtime authorization checks. 7. Restrict filesystem permissions so unrelated users and processes cannot modify the memory directory. 8. Add review, rollback, reset, and complete deletion mechanisms for persisted state. 9. Cryptographically authenticate high-integrity policy files if they are intended to serve as trusted inputs. 10. Clearly document the persistence scope and warn users before untrusted content is stored. ]]>
