T02 · Agent Memory Poisoning
Error
- Location
- agents/squad-manager/AGENTS.md:13
- Finding
- Persistent memory and instruction-policy poisoning across all agents<![CDATA[ ## Vulnerability Details **File Location**: `agents/*/AGENTS.md:13-45, 191-204` **Vulnerability Type**: Persistent memory and agent-policy mutation **Risk Level**: High The same vulnerable policy appears in: - `agents/architect/AGENTS.md` - `agents/brand-reviewer/AGENTS.md` - `agents/code-reviewer/AGENTS.md` - `agents/coder/AGENTS.md` - `agents/copywriter/AGENTS.md` - `agents/observer/AGENTS.md` - `agents/researcher/AGENTS.md` - `agents/squad-manager/AGENTS.md` ### Vulnerable Code ```markdown ## Session Startup Before doing anything else: 1. Read `SOUL.md` — this is who you are 2. Read `USER.md` — this is who you're helping 3. Read `memory/YYYY-MM-DD.md` (today + yesterday) for recent context 4. **If in MAIN SESSION** (direct chat with your human): Also read `MEMORY.md` Don't ask permission. Just do it. ## Memory You wake up fresh each session. These files are your continuity: - **Daily notes:** `memory/YYYY-MM-DD.md` (create `memory/` if needed) — raw logs of what happened - **Long-term:** `MEMORY.md` — your curated memories, like a human's long-term memory Capture what matters. Decisions, context, things to remember. Skip the secrets unless asked to keep them. ### 🧠 MEMORY.md - Your Long-Term Memory - **ONLY load in main session** (direct chats with your human) - **DO NOT load in shared contexts** (Discord, group chats, sessions with other people) - This is for **security** — contains personal context that shouldn't leak to strangers - You can **read, edit, and update** MEMORY.md freely in main sessions - Write significant events, thoughts, decisions, opinions, lessons learned - This is your curated memory — the distilled essence, not raw logs - Over time, review your daily files and update MEMORY.md with what's worth keeping ### 📝 Write It Down - No "Mental Notes"! - **Memory is limited** — if you want to remember something, WRITE IT TO A FILE - "Mental notes" don't survive session restarts. Files do. - When someone says "remember t ...[truncated 3012 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Prohibit agents from modifying `AGENTS.md`, `SOUL.md`, Skills, and other trusted instruction files. 2. Require explicit user confirmation before any persistent-memory write, deletion, or consolidation. 3. Store memory as typed, project-scoped records under a strict allowlisted schema. 4. Attach provenance, timestamp, author, and trust classification to every memory item. 5. Treat user content, web results, project documents, and delegated outputs as untrusted data that can never become executable policy automatically. 6. Separate trusted configuration from writable project and memory directories using filesystem permissions. 7. Replace destructive memory consolidation with versioned, reviewable proposals. 8. Disable cross-project memory by default and provide a user-controlled mechanism to inspect and delete retained data. ]]>
