T02 · Agent Memory Poisoning
- Location
SKILL.md:209- Finding
Persistent Agent Identity and Memory Poisoning
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 209-224
Vulnerability Type: Persistent modification of Agent identity and behavioral state
Risk Level: HighVulnerable Code
bash # 1. 备份当前个性 cp ~/.openclaw/workspace/SOUL.md ~/.openclaw/workspace/SOUL.md.backup cp ~/.openclaw/workspace/IDENTITY.md ~/.openclaw/workspace/IDENTITY.md.backup # 2. 选择性合并个性 # 不要完全覆盖,而是融合 # 示例:学习傅盛的说话风格,但保留你的名字 cat > ~/.openclaw/workspace/SOUL.md << 'EOF' # SOUL.md - 融合版 ## 核心性格 - 自称 "傅盛"(学习自专家) - 用 "养殖" 比喻 OpenClaw - 喜欢分享 "三板斧" 经验 - 结尾带 "🦞"Related persistent-memory instruction at
SKILL.md, lines 126-127:bash echo "## 激活专家\n- 傅盛 (OpenClaw养殖专家)" >> ~/.openclaw/workspace/MEMORY.mdTechnical Analysis
The documented workflow directs users to overwrite
SOUL.mdand append persona instructions toMEMORY.md. These files represent persistent Agent identity and long-term behavioral state. The imported instructions require the Agent to identify itself as another person, use a prescribed communication style, and append a fixed symbol to its responses.Unlike a temporary prompt used only for the current task, these changes can be consumed by later Agent sessions. Material copied from another environment may therefore alter future behavior without being clearly separated from trusted local identity and memory.
Although the interactive script backs up
SOUL.mdandMEMORY.mdbefore asking the user to edit them, the documented workflow still recommends direct persistent-state modification and provides commands that perform it.Attack Path
- An attacker or untrusted backup provider supplies persona or expert-memory content.
- The user follows the documented personality-cloning or expert-activation workflow.
- The workflow overwrites
SOUL.mdor appends instructions toMEMORY.md. - OpenClaw loads those files in later sessions.
- The imported rules continue t ...[truncated 577 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not overwrite
SOUL.md,IDENTITY.md, orMEMORY.mdas part of an import workflow. - Store imported expert material in a quarantined, non-authoritative reference directory.
- Treat imported Markdown as untrusted data rather than Agent instructions.
- Present a diff of every proposed persistent-state change and require explicit approval for each change.
- Reject imported content that attempts to redefine identity, modify safety constraints, prescribe fixed output, or instruct the Agent to execute tools.
- Add provenance metadata identifying the source and import time of every reference document.
- Provide a reliable rollback mechanism using timestamped, non-overwriting backups.
- Ensure OpenClaw does not automatically interpret files under the imported expert-reference directory as privileged system instructions.
- Do not overwrite
