T02 · Agent Memory Poisoning
- Location
scripts/save.sh:51- Finding
Persistent Agent Memory Poisoning Through Untrusted Content
- Content
View full analysis
> "$MEMORY_FILE" << EOF --- name: ${NAME} description: ${DESCRIPTION} type: ${TYPE} date: ${TODAY} --- ${CONTENT:-${DESCRIPTION}} EOF ``` ### Technical Analysis The Skill requires user-supplied preferences, feedback, identity information, project context, and external-system references to be persisted. The save operation inserts `NAME`, `DESCRIPTION`, and `CONTENT` directly into a Markdown file without separating trusted Agent instructions from untrusted remembered data. The only relevant content validation rejects the literal sequence `../`. It does not: - Restrict multiline values. - Escape Markdown or YAML front-matter delimiters. - Prevent instruction-like content from being stored. - Record the source or trust level of an entry. - Require confirmation before persistence. - Ensure that stored content is interpreted exclusively as data. The reading procedure then instructs the Agent to read every Markdown file under `memory/`. Consequently, attacker-controlled text can cross a session boundary and be presented to a future Agent as part of its persistent context. ### Attack Path 1. An attacker supplies a statement that qualifies as a preference, correction, identity detail, project update, or external-resource reference. 2. The statement includes instruction-like content intended to influence a futu ...[truncated 1021 chars]- Remediation
View remediation
