T02 · Agent Memory Poisoning
- Location
SKILL.md:29- Finding
Untrusted Instructions Can Be Promoted into Persistent Agent Memory
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:29-35,SKILL.md:61-65, andSKILL.md:83-87
Vulnerability Type: Persistent memory poisoning
Risk Level: HighVulnerable Code
markdown | Content type | Tier | Examples | |-------------|------|---------| | Stable workflow / procedure | protocols | Emoji shortcuts, deploy steps, tool usage rules | | Active project / waiting-on | active | Current builds, pending replies, live URLs | | Completed work / reference data | archive | Done tasks, contact lists, account tables, old decisions | | Named entity with properties | ontology | People, orgs, projects, properties, locations |markdown ### 4. Rewrite MEMORY.md as router Replace MEMORY.md with a ~25-line index that: - Lists the three tiers with one-line descriptions - Notes the ontology location - Preserves any system directives (NO_REPLY rules, heartbeat instructions) - Contains zero project-specific contentmarkdown ### On each session - Read `memory/protocols.md` (always) - Scan `memory/active.md` (always) - `memory/archive.md` — only on `memory_search` or explicit requestTechnical Analysis
The Skill directs the agent to read all existing memory, identify workflow instructions and system-like directives, and preserve them in files that are automatically read in future sessions. It does not require provenance verification, distinguish trusted directives from untrusted memory content, or request user confirmation before promoting an instruction into the persistent protocol tier.
Consequently, an instruction previously inserted into
MEMORY.mdby an untrusted source could be classified as a stable workflow or preserved system directive. Moving it intomemory/protocols.mdincreases its persistence because that file must be read during every session. The Skill therefore acts as an amplification mechanism for pre-existing prompt injection or memory poisoning....[truncated 1363 chars]
- Remediation
View remediation
Remediation Suggestions
- Treat all existing memory content as untrusted data rather than executable instructions.
- Do not automatically migrate behavioral rules, tool-use instructions, safety exceptions, heartbeat rules, or response-control directives.
- Require explicit user review and approval before adding any instruction to
memory/protocols.md. - Record provenance for each migrated entry, including its source file, author or origin, migration time, and approval status.
- Allow only predefined, schema-validated workflow fields in the protocol tier.
- Reject content that attempts to alter system policies, tool permissions, disclosure controls, or instruction precedence.
- Place newly discovered directives in a quarantine or review file rather than an automatically loaded file.
- Add a verification step that displays a diff of all persistent instruction changes before writing them.
- Provide a rollback mechanism and periodically review persistent instructions for obsolete or suspicious content.
