T02 · Agent Memory Poisoning
- Location
SKILL.md:113- Finding
Untrusted Skill Content Can Be Promoted into Persistent Agent State
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 113-119
Vulnerability Type: Persistent agent-state poisoning
Risk Level: MEDIUMVulnerable Instruction:
text Instead, absorb the useful parts into the local workflow: - behavioral patterns -> `SOUL.md` - workflow rules -> `AGENTS.md` - tool gotchas -> `TOOLS.md` - session-specific lessons -> `memory/YYYY-MM-DD.md` Typical examples of "absorb, don't install":Technical Analysis
The Skill instructs the agent to extract ideas from externally supplied skills and write them into persistent behavior, configuration, or memory files. External skills are untrusted inputs and may contain instructions crafted to appear useful while changing security boundaries or agent behavior.
Although
SKILL.mdrequires explicit approval before installing a reviewed skill, the alternative content-promotion path does not impose an equivalent approval, sanitization, provenance, or exact-diff requirement. Files such asSOUL.md,AGENTS.md, and long-term memory can affect future sessions, so copying externally influenced instructions into them creates a persistent trust-boundary violation.The declared review functionality only requires read-only package inspection and reporting. Writing reviewed content into persistent agent-state files therefore exceeds the minimum privileges necessary for the core audit task.
Attack Path
- An attacker publishes or supplies a skill containing malicious instructions disguised as workflow guidance, tool advice, or security improvements.
- The user asks the auditing Skill to evaluate that package.
- The auditing agent identifies some attacker-controlled text as a useful idea.
- Following the promotion rule, the agent writes the text into
SOUL.md,AGENTS.md,TOOLS.md, ormemory/YYYY-MM-DD.md. - Future sessions load or rely on the modified persistent state.
- The injected rule can influenc ...[truncated 712 chars]
- Remediation
View remediation
Remediation Suggestions
- Make content promotion advisory-only by default. The review should recommend candidate changes without directly modifying persistent files.
- Require explicit user approval separately from installation approval before writing any reviewed material to persistent state.
- Present the destination path and an exact proposed diff before requesting approval.
- Treat all extracted text as untrusted data. Reject instructions that weaken security controls, expand permissions, alter trust boundaries, request secrets, or redirect tools and network activity.
- Store approved review notes in a quarantined, non-executable review document rather than
SOUL.md,AGENTS.md,TOOLS.md, or long-term memory. - If promotion into a behavior file is necessary, rewrite the idea into a narrowly scoped local rule rather than copying source text verbatim.
- Record provenance, including the source package, version, reviewed file, reviewer, approval, and date.
- Limit review operations to read-only access unless the user expressly authorizes a specific persistent change.
