T02 · Agent Memory Poisoning
- Location
SKILL.md:15- Finding
Untrusted conversational content can be promoted into persistent agent instruction files
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:15-26,SKILL.md:262-289,SKILL.md:440-448; related workflow inreferences/openclaw-integration.md:73-124
Vulnerability Type: Persistent agent memory poisoning
Risk Level: HighVulnerable Code or Instructions
markdown | User corrects you | Log to `.learnings/LEARNINGS.md` with category `correction` | | Broadly applicable learning | Promote to `CLAUDE.md`, `AGENTS.md`, and/or `.github/copilot-instructions.md` | | Workflow improvements | Promote to `AGENTS.md` (OpenClaw workspace) | | Tool gotchas | Promote to `TOOLS.md` (OpenClaw workspace) | | Behavioral patterns | Promote to `SOUL.md` (OpenClaw workspace) |markdown ### How to Promote 1. **Distill** the learning into a concise rule or fact 2. **Add** to appropriate section in target file (create file if needed) 3. **Update** original entry: - Change `**Status**: pending` → `**Status**: promoted` - Add `**Promoted**: CLAUDE.md`, `AGENTS.md`, or `.github/copilot-instructions.md`markdown 7. **Promote aggressively** - if in doubt, add to CLAUDE.md or .github/copilot-instructions.mdTechnical Analysis
The workflow treats user corrections, task observations, and error context as candidate learning material and permits that material to be promoted into persistent instruction files such as
CLAUDE.md,AGENTS.md,SOUL.md,TOOLS.md, and.github/copilot-instructions.md.These files are not ordinary audit logs. They are described as workspace prompt files that are injected into later agent sessions. The promotion process does not require explicit owner approval, provenance checks, separation of data from instructions, or sanitization of imperative content. Consequently, an attacker-controlled “correction” can be transformed into a durable agent rule.
The risk is amplified by the instruction to “promote aggressively,” which lowers the threshold for writ ...[truncated 1387 chars]
- Remediation
View remediation
Remediation Suggestions
- Never automatically promote conversational content into agent instruction files.
- Require explicit, informed user approval for each target file and display the exact proposed diff before writing.
- Store learnings in a dedicated data-only location that is not automatically interpreted as agent instructions.
- Add provenance fields identifying the originating session, user, and approval status.
- Reject or quarantine learning entries containing imperative instructions, tool commands, requests to override prior rules, or references to secrets.
- Use a strict allowlist of factual fields that may be promoted, rather than free-form text.
- Remove the “promote aggressively” instruction and require recurrence, independent verification, and maintainer review.
- Provide rollback support and an audit trail for all modifications to persistent prompt files.
