T02 · Agent Memory Poisoning
- Location
SKILL.md:40- Finding
Untrusted Conversation Content Can Poison Persistent Agent Memory
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 40-54
Vulnerability Type: Persistent memory poisoning through untrusted conversation content
Risk Level: MediumVulnerable Code Snippet:
text AUTOMATION: Daily memory save. Review today's conversation for anything worth remembering. Look for: decisions made, preferences expressed, new info about people/projects, lessons learned, things the user asked you to remember, emotional context worth noting. Create or update workspace/memory/YYYY-MM-DD.md (today's date) with a daily note capturing what matters. If anything is significant enough for long-term memory, also update workspace/MEMORY.md. Before writing, read the target memory file first. Avoid duplicating existing sections or substantially similar notes. If a topic already exists, add only genuinely new details under the existing section. Prefer surgical edits over rewriting or re-appending the whole file. If it's been a quiet day with nothing notable, skip silently. Be selective — capture signal, not noise. Write like future-you will need this context. Do NOT message the user about this — just do it quietly.Technical Analysis
The scheduled instruction directs the agent to inspect conversation content and copy selected information into daily and long-term memory files. Conversation content is an untrusted input channel, but the prompt does not require provenance tracking, instruction neutralization, source validation, or user confirmation before writing to
MEMORY.md.An attacker who can contribute content to a conversation can phrase malicious rules, false facts, or behavioral directives as information that should be remembered. If the model considers that content significant, it may persist it in
MEMORY.md. Future sessions that consume this file could then treat the attacker-controlled entry as trusted context. The instruction to avoid duplication may also reinforce an e ...[truncated 1090 chars]- Remediation
View remediation
Remediation Suggestions
- Treat all conversation text as untrusted data rather than executable instructions.
- Explicitly prohibit storing commands, role changes, security-policy changes, tool-use directives, or instructions addressed to future agents.
- Require explicit user confirmation before adding or modifying long-term entries in
MEMORY.md. - Store provenance with every memory entry, including the source conversation, author, timestamp, and whether the entry was user-approved.
- Delimit saved material as non-authoritative reference data so future sessions do not interpret it as system-level instructions.
- Validate proposed entries against existing trusted policies and reject content that attempts to weaken safeguards.
- Prefer structured memory fields over unrestricted prose, with an allowlist of permitted data types such as preferences, project facts, and decisions.
- Provide a review and rollback mechanism for newly created memory entries.
