T02 · Agent Memory Poisoning
- Location
references/formats.md:70- Finding
Persistent Agent Memory Poisoning Through Unvalidated Conversational Content
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent memory manager, but it installs persistent agent-memory behavior with automatic reads and rewrites that users should review carefully before enabling.
Install only if you want OpenClaw to maintain durable local memory across sessions. Review the AGENTS.md and HEARTBEAT.md snippets before applying them, avoid storing secrets or personal data, and periodically inspect or delete the memory files if they contain stale or sensitive context.
references/formats.md:70Persistent Agent Memory Poisoning Through Unvalidated Conversational Content
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
Next: run bash run.sh, verify server.py upload fields match expected schema
Next: open scripts/main.py line 390, add show_name check before _upload_results call
Next: update SKILL.md confirmation step with agent_name instructions, republish ClaWHub 1.0.9
Rule: "Next" must include what + where + expected outcome. A context-free AI should be able to start immediately.
The skill description is written entirely in Chinese, including installation prerequisites and operating instructions, with no indication that other languages are supported or that the Chinese-only presentation is region-specific. Under the language/locale policy rule, this can exclude users by imposing a language choice without opt-in.
The file includes natural-language instructions and user-facing text in Chinese, such as the top-level description and one of the recommended notices, without indicating that language selection is optional or based on user preference. This can violate language/locale policy when a skill imposes a language on users without opt-in.
The trigger phrases are extremely broad and map to common conversational language, so the skill can activate when the user is merely pausing a discussion rather than explicitly requesting persistence. Because the skill writes durable memory files and can alter task state, accidental activation can cause over-collection, incorrect state capture, or unintended persistence of sensitive conversational content.
The first-run flow instructs the agent to read recent session history and MEMORY.md before obtaining user confirmation, with approval required only before writing. Even though the metadata mentions confirmation, the skill behavior still performs potentially privacy-sensitive collection and inference over prior sessions without an explicit opt-in at the point of access.
1. Tell the user: "Your tasks.md is empty. Let me scan your recent work history and build your memory from scratch."
2. Read `MEMORY.md` + most recent session history (`openclaw sessions list --limit 1`)
3. Extract in-progress tasks, statuses, next steps
4. **Present to user for confirmation — never write without approval**
5. On confirmation → write to `memory/tasks.md`
6. If nothing found → ask user what they're working on
The guide explicitly instructs autonomous modification of persistent memory files: rewriting conflicting entries, pruning old content, and archiving journals, but does not require user confirmation, preview, or rollback. In a memory-management skill, silent alteration of stored context can cause integrity loss, accidental deletion of important history, or persistence of incorrect summaries that affect future agent behavior.
Although this appears to be a duplicate of the same persistence behavior, the underlying issue remains valid: the skill encourages cross-session retention and modification of memory artifacts without strong guardrails. In the context of a memory skill, this is more expected than in unrelated skills, but it is still dangerous because durable agent memory can amplify mistakes, retain sensitive data, and silently reshape future decisions.
**① Orient**: scan `memory/tasks.md` and last 7 days of journals — understand current state
**② Collect**: find content worth long-term retention:
- Repeated lessons → distill and write to `MEMORY.md`
- Repeatedly validated methods → update "Notes" in project entries
- Tasks completed 30+ days ago → remove from "Completed" in tasks.md
Although this appears to be a duplicate of the same persistence behavior, the underlying issue remains valid: the skill encourages cross-session retention and modification of memory artifacts without strong guardrails. In the context of a memory skill, this is more expected than in unrelated skills, but it is still dangerous because durable agent memory can amplify mistakes, retain sensitive data, and silently reshape future decisions.
**1 Orient**: scan `memory/tasks.md` and last 7 days of journals — understand current state
**2 Collect**: find content worth long-term retention:
- Repeated lessons → distill and write to `MEMORY.md`
- Repeatedly validated methods → update "Notes" in project entries
- Tasks completed 30+ days ago → remove from "Completed" in tasks.md
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## In Progress
- [ ] {task name}
- Status: {one sentence — what step you're on}
- Next: {specific action; a fresh AI reading this should be able to start without asking}
- Updated: {YYYY-MM-DD HH:MM}
## Completed (archive)
The instruction to record the full content of anything a user says to remember can cause the skill to persist sensitive data verbatim, including credentials, personal data, internal URLs, tokens, or other secrets the user may mention incidentally. In a filesystem-based memory skill, this creates durable local storage of potentially sensitive information without any minimization, classification, or consent guardrails.
The pause triggers are broad and include common conversational endings, which can cause the agent to persist task state when the user did not clearly intend memory updates. In a memory-management skill, this creates unauthorized or surprising retention of session content and increases the chance of storing sensitive data merely because a conversation ended naturally.
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
When creating/deleting projects, releasing versions, or changing Git URLs:
read skills/memory-keeper/SKILL.md and update the project index in MEMORY.md.
## Append to HEARTBEAT.md
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
When creating/deleting projects, releasing versions, or changing Git URLs:
read skills/memory-keeper/SKILL.md and update the project index in MEMORY.md.
## Append to HEARTBEAT.md
The heartbeat-driven creation and maintenance of dated journal files establishes routine session persistence, which is a real security/privacy concern when done automatically. Because the skill is explicitly designed to preserve context across resets, the persistence is intentional but still risky if users are not clearly informed and given control over retention scope and lifetime.
On each heartbeat:
1. Check if today's journal `memory/YYYY-MM-DD.md` exists
- Not found → create it using the template below (once only, never duplicate)
- Found → skip
**Journal template:**
The heartbeat instructions direct the agent to create journal files automatically without any explicit user warning or consent. Automatic persistence on every heartbeat can capture contextual or sensitive session information over time, making this more dangerous because the skill's purpose is long-term memory retention rather than ephemeral operation.
The manifest describes a filesystem-based memory-management skill with no external services, focused on loading and updating memory files. The heartbeat instructions additionally require running openclaw --version and inspecting openclaw.json, which adds host-environment interrogation capabilities beyond the obvious needs of storing and retrieving memory state.
The instructions direct deletion of memory/dream-state.json after enabling native Dreaming, but do not require a warning, backup, or confirmation. Even if framed as cleanup, silent deletion of state can remove potentially useful history and conditions users to accept destructive filesystem actions without informed consent.