T02 · Agent Memory Poisoning
- Location
SKILL.md:38- Finding
Automatic Cross-Session Persistence of Untrusted User Information
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:38-40andSKILL.md:152-158
Vulnerability Type:T02: Agent Memory Poisoning
Risk Level: MediumVulnerable Skill Instructions
SKILL.md:38-40:markdown ### Scenario 4: Cross-session knowledge retention Proactively place user preferences, habits, and project information into the long-term memory palace and archive them in a file.SKILL.md:152-158:markdown ### Memory-write protocol When the user mentions important information, proactively trigger a memory-palace write: Information appears → determine whether it is important → yes → generate an exaggerated image → select a palace location → place it → tell the user "Archived"The snippets above are faithful English translations of the audited instructions.
Technical Analysis
The Skill directs the agent to identify information as important and write it to persistent, cross-session storage automatically. The decision to persist data is made by the agent, and the user is notified only after the write. The instructions do not require prior user consent or define:
- A safe and access-controlled storage location
- Permitted data categories or sensitivity filters
- Per-user or per-project isolation
- Data provenance and trust labels
- Retention periods or deletion procedures
- Validation before persisted information is used in later sessions
Consequently, attacker-controlled conversation content can be stored as durable state. If later agent behavior relies on that state without treating it as untrusted data, the persisted content can poison future decisions or task context.
This repository contains documentation rather than an implementation of the storage mechanism. Exploitation therefore depends on the host agent providing file-writing or persistent-memory capabilities and following these instructions.
Attack Path
- An attacker interacts with an agent th ...[truncated 1487 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit, informed user opt-in before every persistent write. Notification after storage is not sufficient.
- Present the exact information, destination, purpose, and retention period before requesting approval.
- Never persist credentials, authentication tokens, financial information, health data, government identifiers, or other sensitive personal data.
- Treat all persisted user content as untrusted data, never as authoritative agent instructions.
- Store provenance metadata, including the originating user, session, timestamp, purpose, and approval record.
- Enforce strict per-user and per-project access isolation using a declared, access-controlled storage location.
- Validate and sanitize data before storage and again before retrieval.
- Define expiration, review, correction, export, and deletion controls.
- Ask for confirmation before retrieved memory materially affects a later task.
- Replace the automatic protocol with a consent-based flow:
text Information appears → assess sensitivity and relevance → show the proposed memory to the user → request explicit approval → write to isolated storage → record provenance and expiration → confirm completion
