T02 · Agent Memory Poisoning
- Location
SKILL.md:40- Finding
Untrusted Conversation Logs Can Poison Persistent Agent Memory
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 40-50
Vulnerability Type: Persistent memory poisoning through untrusted log distillation
Risk Level: HighEvidence
The affected instructions require the agent to process every daily log, extract conclusions and rules, and route them into persistent workspace files:
markdown Perform the following operations on all `YYYY-MM-DD.md` files in the `memory/` directory: 1. Identify all conclusions, preferences, lessons, progress, and similar information. 2. Update the corresponding files according to these routing rules: - User preferences → `USER.md` - Behavioral rules and lessons → `SOUL.md` - Environment parameters and tool configuration → `TOOLS.md` - Identity definitions → `IDENTITY.md` - Project progress and process data → `PROJECTS.md` - Domain knowledge → `AREAS.md` - Static reference material → `RESOURCES.md`The excerpt is an English rendering of the source instructions.
Technical Analysis
Daily conversation logs are potentially attacker-influenced data. The skill instructs the agent to interpret their contents and merge extracted information into files that define the user's profile, the agent's identity, behavioral rules, tool configuration, and long-term knowledge.
No trust-boundary validation, provenance tracking, instruction filtering, approval requirement, or protected-field policy is specified. In particular, the skill does not distinguish legitimate user facts from text crafted to look like a preference, lesson, identity definition, tool rule, or safety policy. It also does not prohibit replacing existing trusted rules with conclusions extracted from untrusted logs.
An attacker who can place content in a conversation log can phrase malicious instructions as durable facts or lessons. During maintenance, the agent may classify and persist that content in
SOUL.md,TOOLS.md,IDENTITY.md, or `USE ...[truncated 1458 chars]- Remediation
View remediation
Remediation Suggestions
- Treat all daily-log content as untrusted data rather than authoritative instructions.
- Reject imperative text, embedded prompts, policy changes, and tool-use directives during extraction.
- Require explicit user approval before modifying
SOUL.md,TOOLS.md,IDENTITY.md, safety constraints, or other high-impact fields. - Define an allowlist of facts that may be written automatically. Prevent automated changes to identity, security rules, permissions, executable commands, and tool configuration.
- Preserve provenance for every distilled entry, including the source file, date, originating role, and confidence level.
- Generate a proposed diff and require review before applying sensitive changes.
- Prevent extracted content from weakening or replacing existing trusted safety rules.
- Separate factual memory from executable instructions so stored text cannot automatically become agent policy.
- Add validation for contradictory, unverifiable, or unusually privileged claims.
- Keep versioned backups and provide an atomic rollback mechanism for every maintenance run.
