T02 · Agent Memory Poisoning
- Location
scripts/memory_sync.py:95- Finding
Persistent Agent Memory Poisoning Through Untrusted Message Content
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill performs the cross-channel memory function it advertises, but it handles linked identities and conversation memory with under-scoped persistence and isolation risks.
Install only in a controlled environment where all linked users have explicitly opted in. Before production use, require per-user memory isolation, validated identifiers, configurable OpenClaw paths, retention/deletion controls, and clear handling of stored user messages as untrusted data.
scripts/memory_sync.py:95Persistent Agent Memory Poisoning Through Untrusted Message Content
scripts/memory_sync.py:51Cross-User Memory Disclosure Caused by Missing Per-User Isolation
scripts/session_hooks.py:31Arbitrary File Write Through Path Traversal in Account and Session Identifiers
scripts/memory_sync.py:14Hard-Coded Host-Specific Paths Can Target Another User's OpenClaw Data
The README explicitly promotes cross-channel identity linking and unified storage of conversation records, but it provides no safeguards, consent model, retention guidance, or access-control warnings. Because this skill correlates identities across platforms and reuses memories between channels, it creates a meaningful privacy and data-handling risk if deployed without explicit policy and technical controls.
The documented workflow persists user messages and makes them searchable from shared memory paths, which can expose sensitive user data beyond the originating channel or session. In this skill's context, the risk is heightened because memory is intentionally synchronized across channels and agents, increasing the blast radius of any overcollection, unauthorized access, or mistaken identity linkage.
python3 ~/.openclaw/skills/cross-channel-memory/scripts/memory_sync.py write \
--channel qqbot \
--id "用户ID" \
--type user \
The documented workflow persists user messages and makes them searchable from shared memory paths, which can expose sensitive user data beyond the originating channel or session. In this skill's context, the risk is heightened because memory is intentionally synchronized across channels and agents, increasing the blast radius of any overcollection, unauthorized access, or mistaken identity linkage.
python3 ~/.openclaw/skills/cross-channel-memory/scripts/memory_sync.py write \
--channel qqbot \
--id "用户ID" \
--type user \
The skill documents use of shell commands plus file read/write against shared paths under ~/.openclaw, but it declares no explicit tool scope or permissions boundary. That makes the skill over-privileged by default and increases the chance an agent can access or modify files beyond the minimum required for cross-channel memory syncing.
The skill explicitly enables identity linking and memory sharing across QQ, 飞书, and other channels, but it provides no user-facing notice or consent flow. Cross-channel correlation changes the privacy expectations of users and can expose prior conversations from one platform while they are interacting on another.
The initialization procedure instructs operators to collect and persist channel-specific identifiers in a shared JSON mapping file without any handling guidance. These identifiers are sensitive account-linkage data; if exposed or misused, they enable user tracking, cross-platform deanonymization, and incorrect identity association.
This duplicate finding points to the same write-and-retrieve behavior that creates durable session persistence. In this skill, persistence is especially sensitive because linked identities let stored content follow the user across platforms and agents, raising the chance of unintended disclosure.
将对话记录写入指定 agent 的记忆:
python3 ~/.openclaw/skills/cross-channel-memory/scripts/memory_sync.py write \
--channel qqbot \
--id "QQ_USER_ID" \
--account coder \
This duplicate finding points to the same write-and-retrieve behavior that creates durable session persistence. In this skill, persistence is especially sensitive because linked identities let stored content follow the user across platforms and agents, raising the chance of unintended disclosure.
将对话记录写入指定 agent 的记忆:
python3 ~/.openclaw/skills/cross-channel-memory/scripts/memory_sync.py write \
--channel qqbot \
--id "QQ_USER_ID" \
--account coder \
The module title and all user-facing CLI descriptions are written only in Chinese, which imposes a language choice on users without any opt-in or alternative locale. The policy for natural-language content requires offering a language/locale choice or clearly documenting a justified locale constraint.
The skill is presented as a lookup tool for cross-channel identity and memory discovery, but it also includes write capability that persists new identity mappings to a shared database. In a cross-channel memory context, this is security-sensitive because unauthorized or accidental writes can change identity resolution and cause one user's conversations or memory paths to be associated with another user.
This code creates the parent directory and writes updated mapping data to a persistent JSON file, which modifies user-related data on disk. While the CLI has an --add flag, there is no confirmation prompt, cautionary message, or explicit user-facing warning near the write path describing that the operation persists and changes shared mapping state.
The CLI supports arbitrary addition of channel user IDs to unified identities via --add without any visible authorization, validation, or proof-of-identity checks. In this skill's context, that can let an operator or compromised agent bind an external account to the wrong unified user and then gain access to shared memory paths across channels, creating a direct cross-user data exposure risk.
The file presents its tool name and user-facing descriptions entirely in Chinese, including the module docstring and later CLI help text, without offering a language choice or documenting that the skill is intentionally region-specific. This creates a language/locale policy issue because the skill implicitly enforces one language for users regardless of preference.
This tool writes cross-channel user messages and identifiers to persistent disk storage without any visible consent, notice, retention control, or minimization. In the context of a cross-channel memory sync skill, this is more dangerous because it aggregates identity and conversation data across platforms, increasing privacy risk and the blast radius of unauthorized access or misuse.
The code persistently stores cross-channel identity mapping data to disk, including unified user IDs and per-channel identifiers, without any consent flow, disclosure, retention control, or access restriction visible in this file. In the context of a cross-channel memory skill, this creates a real privacy/security risk because it links identities across platforms and can enable profiling or unintended disclosure if the host is shared or the files are later accessed by other components.
The session state file automatically records user linkage metadata such as unified user ID, channel, agent ID, and update history, again without any user-facing warning or consent. This is sensitive correlation data in a cross-channel identity feature, and persistent storage increases the blast radius of accidental exposure, local compromise, or misuse by adjacent tools reading the same data directory.
This Python test file contains its module docstring, comments, and user-facing print messages entirely in Chinese, including the main test status output. Because there is no indication of user language selection or justification for a Chinese-only locale, this creates a natural-language locale policy concern under the language/locale rule.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
import subprocess
# 添加用户
result = subprocess.run([
sys.executable,
"init_mapping.py",
"add-user",
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print(f"错误:{result.stderr}")
# 绑定 QQ 渠道
result = subprocess.run([
sys.executable,
"init_mapping.py",
"link",
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print(f"绑定 QQ 渠道结果:{result.stdout}")
# 列出用户
result = subprocess.run([
sys.executable,
"init_mapping.py",
"list"
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
import subprocess
# 查找用户
result = subprocess.run([
sys.executable,
"lookup_user.py",
"--channel", "qqbot",
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
import subprocess
# lookup 命令
result = subprocess.run([
sys.executable,
"memory_sync.py",
"lookup",
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print(f"查找记忆路径结果:{result.stdout}")
# write 命令
result = subprocess.run([
sys.executable,
"memory_sync.py",
"write",
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
import subprocess
# hook 命令
result = subprocess.run([
sys.executable,
"session_hooks.py",
"hook",
All visible user-facing documentation in this file is Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking environment. This can violate language/locale policy when a skill forces a specific language without user opt-in.
No suspicious patterns detected.