T02 · Agent Memory Poisoning
- Location
SKILL.md:39- Finding
Unvalidated Feedback Can Poison Persistent Agent Memory
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:39-52
Vulnerability Type: Persistent storage of attacker-controlled feedback as behavioral state
Risk Level: MediumComplete Source Segment (English Translation):
markdown ### Satisfied (A) - Record the successful pattern in `memory/feedback-log.md` - Reinforce the current behavior pattern - Reply: "Okay, remembered!" ### Needs Improvement (B) - Record the specific issue - Ask for a specific improvement plan - Update the user preference record ### Dissatisfied (C) - Record the failure case in `memory/error-log.md` - Provide a remediation plan - Apologize and learnThe storage behavior is also corroborated by
README.md:24-27, which identifiesmemory/feedback-log.mdandUSER-PREFERENCES.mdas persistent data locations.Technical Analysis
The Skill directs the agent to persist conversational feedback and use it to reinforce behavior or update user preferences. The feedback content is user-controlled, but the instructions do not require validation, explicit approval before each write, separation of data from instructions, expiration, or restrictions preventing stored feedback from changing security-sensitive behavior.
An attacker who can provide feedback directly, or influence it through injected content, could submit misleading preferences or behavioral guidance. If later sessions consume these records as trusted memory, the injected state may continue influencing responses beyond the original interaction.
The project contains only Markdown documentation and does not include executable scripts that implement these writes. Consequently, exploitation depends on a host agent interpreting the Skill instructions and having access to the referenced persistent storage.
Attack Path
- The host agent completes a task and activates the feedback workflow.
- An attacker supplies crafted negative or improvement feedback containin ...[truncated 1029 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user consent before every persistent feedback or preference write.
- Store feedback as untrusted observational data, never as executable instructions or authoritative behavioral rules.
- Apply a strict schema that permits only predefined feedback values and rejects free-form directives in behavioral fields.
- Prevent feedback records from modifying safety policies, tool permissions, system prompts, authentication decisions, or other security-sensitive behavior.
- Separate records by user and task to prevent one user from influencing another user's sessions.
- Record provenance, timestamps, and the originating task for every entry.
- Add expiration, review, correction, export, and deletion controls for persistent records.
- Sanitize free-form content before it is presented to or consumed by another agent session.
- Treat generated weekly reports as summaries of untrusted data and prohibit them from automatically updating agent policy.
- Document the exact storage lifecycle and ensure writes remain within the minimum permissions required for feedback collection.
