T01 · Skill Instruction Hijacking
- Location
src/daemon/server.ts:282- Finding
Untrusted P2P Message Content Is Forwarded Directly into OpenClaw Agent Events
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
ClawChat appears to be a legitimate agent-to-agent chat tool, but its default remote access and wake behavior can let outside peers influence an OpenClaw agent too broadly.
Review before installing. Use an explicit allowlist instead of ["*"], disable openclawWake unless you trust every sender, treat all received message content as untrusted, avoid passing seed phrases or passwords on the command line, restrict data-directory and socket permissions, and prefer pinned/local package execution. I did not find artifact-backed deception, exfiltration, or intentionally destructive behavior.
src/daemon/server.ts:282Untrusted P2P Message Content Is Forwarded Directly into OpenClaw Agent Events
src/net/snap2p-protocol.ts:196Authenticated Principal Is Not Bound to the Principal in the Signed Attestation
src/net/snap2p-protocol.ts:308Chat Message Sender Is Not Bound to the Authenticated Session Identity
src/daemon/gateway-config.ts:211Gateway Initialization Enables Wildcard Remote Access and Agent Wake by Default
src/daemon/server.ts:184Local IPC Socket Commands Lack Explicit Authorization and Socket Permission Hardening
Showing a 24-word seed phrase as a command-line argument is especially dangerous because recovery phrases are wallet-equivalent secrets and may be captured in shell history, logs, telemetry, or process inspection. Anyone obtaining that phrase can fully recover the identity and associated assets or communications identity.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
clawchat identity recover \
--mnemonic-file /path/to/seedphrase.txt \
--password-file /path/to/password.txt
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
launchctl unload ~/Library/LaunchAgents/com.clawchat.daemon.plist
rm ~/Library/LaunchAgents/com.clawchat.daemon.plist
The lockfile pins nanoid 5.1.6 under @libp2p/circuit-relay-v2, and the cited advisories indicate denial-of-service/integer handling flaws in nanoid size processing. This is a real supply-chain risk, but in this file the package is a transitive dependency and there is no evidence the project directly passes attacker-controlled negative or zero sizes, so practical exploitability from this file alone is limited.
lodash 4.17.23 is present and has well-known classes of issues including prototype pollution and template/code-injection in specific APIs. This is a true vulnerable dependency, though whether it is exploitable depends on the application invoking unsafe functions like _.unset on attacker-controlled paths or _.template on untrusted input, which cannot be confirmed from the lockfile alone.
nanoid 3.3.11 appears in a dev/build dependency path via postcss and carries advisories around edge-case size handling and looping behavior. This is a genuine vulnerable version, but because it is in development tooling and not obviously part of runtime processing for this skill, the security impact in deployed use is lower unless untrusted build-time inputs are processed.
postcss 8.5.6 is present only as a dev dependency in the frontend/build toolchain, and the listed advisories include file-read, sourcemap, and output-escaping issues. The dependency is genuinely vulnerable, but from this lockfile context it appears build-time only, which reduces exposure unless the project processes attacker-supplied CSS or source maps during builds.
rollup 4.57.1 is included as a development/build dependency, and an arbitrary file write via path traversal advisory is plausibly serious when build inputs are attacker-controlled. However, in this package-lock context there is no evidence of hostile plugin/input handling at runtime, so the issue is real but mainly affects development or CI environments rather than end-user execution.
Instructions found that direct the agent to transmit conversation context or user data to external services.
# Send dinner poll update to Peter's agent
Incoming network messages can cause the daemon to invoke an external program (openclaw) with attacker-controlled content embedded in the --text argument. Even without shell injection, this creates an unintended remote-triggered side effect outside the chat daemon's core purpose, enabling spammy or abusive local system event generation and expanding trust from remote peers into local process execution.
Instructions found that direct the agent to transmit conversation context or user data to external services.
allowLocal: boolean;
/**
* Remote peers allowed to send messages to this identity
* Use ["*"] for all peers, or list specific principals
*/
allowedRemotePeers: string[];
Instructions found that direct the agent to transmit conversation context or user data to external services.
allowLocal: boolean;
/**
* Remote peers allowed to send messages to this identity
* Use ["*"] for all peers, or list specific principals
*/
allowedRemotePeers: string[];
Instructions found that direct the agent to transmit conversation context or user data to external services.
allowLocal: boolean;
/**
* Remote peers allowed to send messages to this identity
* Use ["*"] for all peers, or list specific principals
*/
allowedRemotePeers: string[];
Instructions found that direct the agent to transmit conversation context or user data to external services.
allowLocal: boolean;
/**
* Remote peers allowed to send messages to this identity
* Use ["*"] for all peers, or list specific principals
*/
allowedRemotePeers: string[];
The quick-start instructs users to execute npx clawchat without pinning an exact package version. This can cause users to fetch and run whatever version is current at execution time, increasing supply-chain risk if a malicious or compromised release is published or if behavior changes unexpectedly.
This command uses npx clawchat without a pinned version, so execution depends on the latest package resolution at runtime. That exposes users to unintended code execution from a changed, hijacked, or compromised npm release.
The documentation tells users to run npx clawchat without fixing the package version. In security-sensitive tooling, this creates a supply-chain exposure because the executed package may differ over time and may not match what was audited.
Using npx clawchat unpinned in peer-management instructions means users may execute an unreviewed package version during setup. Because these commands establish network connectivity, a compromised package could abuse trust during onboarding.
The send-message example relies on an unpinned npx package invocation. That introduces avoidable remote code execution risk via npm package substitution or release compromise, especially since users are encouraged to run it directly from docs.
The receive-message command uses npx clawchat without a fixed version, so the tool executed at runtime may not be the one users expect. This is a classic documentation-driven supply-chain weakness rather than a code bug, but it can still lead to arbitrary code execution on the user's machine.
This identity-management example uses an unpinned package reference via npx. If the npm package changes or is compromised, users could execute hostile code while handling identity-related operations.
The daemon stop command is shown with npx clawchat and no version pin. Even routine operational commands become a supply-chain risk when docs encourage fetching executable code dynamically at runtime.
This start command again relies on unpinned npx execution, making the quick-start nondeterministic and vulnerable to malicious or accidental upstream package changes. Because the command starts a background daemon, compromise could yield persistent local access.
The message-send example for alternate identities uses an unpinned npm execution path. In a security-oriented messaging tool, this is especially risky because users may assume cryptographic operations are trustworthy while actually running an unverified package version.
The troubleshooting command tells users to run npx clawchat without version pinning, repeating the same supply-chain issue. Troubleshooting steps are often copy-pasted quickly, so this increases the likelihood of users executing unreviewed package code.
Detected: suspicious.dangerous_exec, suspicious.exposed_secret_literal, suspicious.generated_source_template_injection