T02 · Agent Memory Poisoning
- Location
SKILL.md:103- Finding
Persistent Skill Modification Using User-Derived Interaction Content
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 103
Vulnerability Type: Persistent memory poisoning through unvalidated interaction-derived content
Risk Level: MediumComplete Code Snippet:
markdown | *→ Add [O] entries here after each real use — paste the actual failure pattern* | *What went wrong and why* |Technical Analysis
The instruction directs an agent to update the skill after each real use by pasting an actual failure pattern into persistent skill content. Because the source material may originate from user-controlled conversations, this creates a path for untrusted text to enter state that is loaded in future sessions.
No validation, sanitization, confidentiality review, tenant isolation, approval step, or retention policy is specified. An attacker could construct a negotiation scenario containing instruction-like text and encourage the agent to classify that text as an observed failure pattern. If the agent has write access and follows this directive, the content could be incorporated into
SKILL.mdand subsequently interpreted as trusted skill guidance.Negotiation interactions may also contain sensitive salary, fundraising, merger and acquisition, vendor, or commercial information. The instruction to paste the “actual” pattern creates an additional risk of retaining such information beyond the original session.
Attack Path
- An attacker invokes the skill with a crafted negotiation scenario containing misleading rules or instruction-like content.
- The interaction is presented as revealing an “actual failure pattern.”
- Following
SKILL.md:103, an agent with filesystem write access appends the attacker-influenced material to the persistent skill file. - The modified skill is loaded during later, unrelated sessions.
- The persisted material affects future analysis or exposes retained details from the original interaction.
This path depends on the hosting agent ...[truncated 805 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the directive to paste observed interaction content directly into
SKILL.md. - Keep the distributed skill package immutable at runtime and deny the agent write access to skill instruction files.
- If operational learning is required, store observations in a separate, structured data store rather than executable or instruction-bearing Markdown.
- Require explicit user consent before retaining any interaction-derived information.
- Redact names, deal terms, financial figures, company information, credentials, and other sensitive data before storage.
- Validate stored observations against a strict schema and reject instruction syntax, tool directives, links, embedded code, and role-changing language.
- Isolate retained observations by user or tenant, enforce access controls, and establish expiration and deletion policies.
- Require human review and provenance metadata before promoting an observation into trusted skill guidance.
- Treat all learned content as quoted, non-authoritative data when it is displayed to an agent in future sessions.
- Remove the directive to paste observed interaction content directly into
