T02 · Agent Memory Poisoning
Warning
- Location
- references/policies.md:8
- Finding
- Persistent Agent-State Manipulation Through Policy Directives<![CDATA[ ## Vulnerability Details **File Location**: `references/policies.md`, lines 8–19 **Vulnerability Type**: Persistent memory and shared-state poisoning **Risk Level**: Medium ### Vulnerable Content ```markdown ## Security & data hygiene - Security is paramount; never expose secrets, tokens, or private files unless the requester is explicitly authorized. - When handling attachments, confirm their source and check for suspicious metadata. - Log every sensitive action in `memory/YYYY-MM-DD.md` so auditors can reconstruct decisions. ## Collaboration etiquette - Mention teammates and tag them when you need a synchronous check. - Keep threads tidy: summarize the ask, list what you tried, and propose the next step. - For cross-agent work, update `HEARTBEAT.md` or relevant memory entries so everyone knows the plan. ## Change management - Run Memory Keeper before risky operations (updates, system reboots, large refactors) so you can roll back. ``` ### Technical Analysis The bundled policy document instructs an agent to write information into persistent memory files and shared coordination state. In particular, it directs the agent to: - Record every sensitive action in `memory/YYYY-MM-DD.md`. - Modify `HEARTBEAT.md` or other memory entries during cross-agent work. - Invoke an additional capability named “Memory Keeper.” These side effects exceed the Skill’s declared read-only purpose of listing, searching, and quoting policy sections. Because the document is presented as workspace policy, an agent may treat these statements as operational commands rather than informational content. The instruction to log every sensitive action is especially risky. Sensitive actions may contain confidential filenames, operational decisions, security events, account information, or other context that should not be copied into durable or broadly accessible agent memory. Content written into shared state can subsequently influence other agents or future sessions. The Pyth ...[truncated 1424 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove directives that require agents to modify `memory/`, `HEARTBEAT.md`, or other persistent state from the bundled reference document. 2. Treat retrieved policy text strictly as informational data to quote or summarize, not as executable agent instructions. 3. If audit logging is genuinely required: - Require explicit user authorization before writing. - Use a dedicated, access-controlled audit mechanism. - Record only minimal, non-sensitive metadata. - Redact secrets, tokens, private paths, personal data, and confidential content. - Define retention, access-control, and deletion policies. 4. Do not direct agents to invoke “Memory Keeper” or another Skill unless the user explicitly requests and authorizes that operation. 5. Add tests confirming that policy lookup remains read-only and does not cause changes to persistent or shared agent state. ]]>
