T02 · Agent Memory Poisoning
- Location
SKILL.md:76- Finding
Uncontrolled Persistent Memory Modification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 76-77
Vulnerability Type:T02: Agent Memory Poisoning
Risk Level: MediumComplete Code Snippet:
markdown ### 第 6 步:记忆沉淀 把“为什么这么设计”写进短期记忆;稳定后再升格长期记忆。English translation:
text Step 6: Memory persistence Write “why it was designed this way” into short-term memory; once stable, promote it to long-term memory.Technical Analysis
The Skill explicitly directs the Agent to persist reasoning extracted from human-Agent conversations into short-term memory and subsequently promote it to long-term memory. It does not require validation of the source material, sanitization of instruction-like content, explicit user authorization, provenance tracking, scope restrictions, expiration, or rollback controls.
Because conversation content may be supplied or influenced by an untrusted participant, malicious behavioral rules could be presented as useful design rationale and persisted as Agent state. Promotion to long-term memory creates a risk that this content will continue influencing later, unrelated sessions. Persistent memory modification is not necessary to produce the stated Skill artifacts and therefore exceeds the minimum capabilities required for the task.
Attack Path
- An attacker participates in or influences a collaboration processed by the Skill.
- The attacker introduces a malicious instruction disguised as a reusable design principle or important decision rationale.
- The Skill extracts that material as an explanation of why the resulting process was designed in a particular way.
- Following lines 76-77, the Agent writes the extracted material into short-term memory.
- Because the document provides no concrete validation or approval criteria for determining stability, the malicious material may later be promoted to long-term memory.
- The persisted rule influences the Agent's decisions or behavior in subsequent s ...[truncated 760 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the persistent-memory step and save design rationale in a project-scoped, user-reviewable file instead.
- If memory storage is essential, require explicit informed user approval before every memory write and before promotion to long-term memory.
- Restrict stored data to narrowly defined, structured facts. Reject commands, behavioral directives, tool instructions, safety-policy changes, credentials, and executable content.
- Record the source, author, timestamp, project scope, and approval status for each memory entry.
- Define objective promotion criteria rather than relying on an undefined determination that content is “stable.”
- Apply expiration periods and provide mechanisms to inspect, revoke, and delete stored entries.
- Prevent project-derived memory from affecting unrelated projects or users.
- Revalidate stored content against current safety policies whenever it is retrieved; memory must never override system or developer instructions.
