T02 · Agent Memory Poisoning
- Location
SKILL.md:42- Finding
Uncontrolled Persistence of Task-Derived Content in Agent Memory
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 42–44
Vulnerability Type: Agent memory poisoning through unvalidated persistent writes
Risk Level: MediumVulnerable Code
markdown - Durable outcomes/decisions → daily memory - Stable preferences/facts → long-term memory - Temporary chatter/debug text should not be promoted unless reusedThe broader orchestration flow also requires logging at
SKILL.md, line 30:markdown 5. Log durable outcomes and follow-ups.Technical Analysis
The skill instructs the agent to write task-derived decisions, outcomes, preferences, and facts into daily or long-term memory. It does not require explicit user consent, source verification, content sanitization, or a restrictive allowlist before persistence.
Consequently, attacker-controlled task content could be misclassified as a stable preference, fact, or durable decision and retained beyond the current session. The exception allowing temporary content to be promoted when “reused” is also unsafe: repetition does not establish authenticity or suitability for persistent storage.
Attack Path
- An attacker or untrusted external source introduces a false preference, fabricated fact, or malicious behavioral instruction into a task.
- The skill’s orchestration process treats that content as a durable outcome, stable preference, or stable fact.
- Following the memory-hygiene instructions, the agent records the content in daily or long-term memory.
- In later sessions, the agent retrieves and relies on the poisoned state.
- The persisted content influences future responses, decisions, or tool use until the memory is reviewed or removed.
Impact Assessment
Exploitation can affect future sessions that consume the same persistent agent memory. An attacker may influence later decisions, responses, and task execution by planting false state. The vulnerability does not itself grant ope ...[truncated 201 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit, informed user confirmation before every write to daily or long-term memory.
- Define a narrow allowlist of persistable data types and default all other task content to session-only storage.
- Verify the provenance and accuracy of facts before persistence; never treat repetition as validation.
- Prohibit storing executable instructions, behavioral overrides, credentials, secrets, external-content directives, and unverified third-party claims.
- Present the exact proposed memory entry, destination, purpose, and retention period to the user before saving it.
- Provide mechanisms to inspect, correct, expire, and delete persisted entries.
- Record provenance metadata so later sessions can distinguish user-confirmed facts from inferred or externally supplied content.
- Replace the current rules with language such as: “Do not write to persistent memory unless the user explicitly approves the exact sanitized entry.”
