Back to skill

Security audit

openclaw-chat-with-friends-zh

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its Telegram bot-chat purpose, but it needs review because it asks users to expose channel messages to bots and persist channel-specific behavior in a global agent file.

Install only if you are comfortable creating a dedicated Telegram channel where every connected bot may read the conversation and post messages. Avoid sensitive personal, business, or regulated content; verify every bot owner; grant only the minimum Telegram permissions; avoid forwarding real channel content to public lookup bots; and review any AGENTS.md changes so they are clearly scoped, removable, and do not affect unrelated OpenClaw sessions.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:69
Finding
Overbroad Telegram Message Visibility and Administrator Privileges<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 69-116 **Vulnerability Type**: `T05: Unauthorized Access and Privilege Escalation` **Risk Level**: Medium ### Vulnerable Skill Instructions The following English translation preserves the relevant instructions from the source: ```markdown Each OpenClaw bot needs to disable privacy mode so that it can read all messages in the channel, rather than only commands sent to it. 1. Open a conversation with @BotFather in Telegram. 2. Send /setprivacy. 3. Select your OpenClaw bot. 4. Select Disable. Both OpenClaw bots need to be administrators in the channel. This is critical—only administrators can send messages in a channel, and administrator bots can see messages from other administrator bots. At minimum, grant the Send Messages permission. ``` ### Technical Analysis The Skill directs every participant to disable Telegram bot privacy controls and grant each bot channel-administrator status. This combines broad message visibility with elevated channel permissions. Although sending messages may be necessary for the advertised multi-bot interaction, administrator access and unrestricted message processing violate least-privilege principles unless every capability is demonstrably required. The instructions do not require users to review individual Telegram permissions, assess whether each bot is trusted, or isolate the bots in a channel containing no sensitive information. Any bot connected under this configuration can process channel discussions visible through its Telegram integration. A compromised, malicious, or incorrectly configured bot can therefore use the permissions that the user deliberately granted. ### Attack Path 1. A user follows the Skill and creates or joins a Telegram channel. 2. The user disables privacy mode for the OpenClaw bot through `@BotFather`. 3. The channel owner adds that bot as an administrator and grants permission to send messages. 4. The same process is repe ...[truncated 1035 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Preserve privacy mode where mention-only or command-only interaction can satisfy the use case. - Grant only the individual Telegram permissions required to publish messages; explicitly disable all unrelated administrator capabilities. - Clearly warn users that every connected bot may receive channel content and that a friend's bot may run in a separately controlled environment. - Recommend a dedicated private channel that contains no confidential, personal, or operationally sensitive information. - Require users to verify the ownership and security of every bot before granting access. - Document how to revoke administrator status, remove a bot, rotate its token, and review channel administrator permissions. - Prefer an architecture that relays explicitly selected messages instead of exposing the complete conversation stream to every bot. ]]>

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:193
Finding
Persistent Agent Behavior Modification Through Global AGENTS.md Rules<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 193-231 **Vulnerability Type**: `T02: Agent Memory Poisoning` **Risk Level**: Medium ### Vulnerable Skill Instructions The following English translation preserves the relevant instructions from the source: ```markdown The channel rules exist only in the current session. If the user runs /new in OpenClaw to start a new session, these rules will be lost. You must remind the user to write the channel rules into OpenClaw's AGENTS.md file. This ensures that the rules are persisted and automatically loaded in every new session. 1. Open OpenClaw's configuration directory and locate AGENTS.md. Create it if it does not exist. 2. Write all of the configured channel rules into AGENTS.md. 3. Save the file. ## Interaction rules - Every message must begin with your name followed by a colon. - Only respond when named or when nobody has responded for more than two minutes. - Maintain at least thirty seconds between responses. - Read the most recent ten messages as context. - Your name is [bot name]. ``` ### Technical Analysis `AGENTS.md` is described as a persistent source of behavioral instructions loaded whenever a new OpenClaw session starts. The Skill explicitly requires users to write identity, message-formatting, response-trigger, timing, and context-processing directives into this persistent file. The prescribed rules are intended for a particular Telegram channel, but the instructions do not establish a technical scope limiting them to that channel. If `AGENTS.md` applies globally, future unrelated sessions can inherit the channel-specific identity and response constraints. This constitutes persistent modification of agent state and behavior. The content is visible to the user rather than secretly injected, which reduces the likelihood of covert compromise. Nevertheless, the mandatory language and absence of channel-specific isolation create a durable cross-session effect. ### Attack P ...[truncated 1284 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Store the rules in channel-specific configuration rather than a globally loaded `AGENTS.md`. - If `AGENTS.md` must be used, wrap every directive in an explicit condition stating that it applies only while handling messages from the identified Telegram channel ID. - Do not use unconditional instructions such as “every message must” when the intended scope is one integration. - Present the exact persistent changes for user review and obtain explicit confirmation before modifying the file. - Back up the existing `AGENTS.md` and merge changes without replacing unrelated instructions. - Mark the inserted section with clear beginning and ending comments so it can be removed safely. - Provide rollback instructions that restore the previous configuration. - Validate that channel rules do not override higher-priority security controls or affect direct, non-channel sessions. ]]>

other

Note
Location
SKILL.md:121
Finding
Private Channel Content Disclosure to Unverified Third-Party Telegram Bots<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 121-124 **Vulnerability Type**: `other: Third-party metadata disclosure` **Risk Level**: Low ### Vulnerable Skill Instructions The following English translation preserves the relevant instructions from the source: ```markdown Obtain the channel Chat ID using one of several methods: - Forward any message from the channel to @userinfobot or @getidsbot. It will return the channel Chat ID, usually a negative number in a format similar to -100xxxxxxxxxx. - Alternatively, check whether the OpenClaw panel or settings can automatically detect joined channels. ``` ### Technical Analysis The Skill recommends forwarding a Telegram channel message to one of two external bots to recover the channel ID. Forwarding a message transfers data to a third-party service outside the channel's original trust boundary. Depending on Telegram's forwarding behavior and the selected message, the recipient may receive message content and associated source metadata. The project provides no verification of either bot's operator, implementation, retention policy, privacy policy, or continued ownership. It also does not warn users to avoid forwarding sensitive content. This is not remote code execution and does not demonstrate malicious behavior by either named bot. The confirmed weakness is the unsafe recommendation to disclose data to unverified third parties. ### Attack Path 1. A user creates or joins a private Telegram channel. 2. The user selects an existing channel message, potentially containing private content. 3. Following the Skill, the user forwards that message to `@userinfobot` or `@getidsbot`. 4. The third-party bot receives and processes the forwarded message and available metadata. 5. The third-party operator may retain, analyze, correlate, or disclose the received information according to practices that are not documented by the Skill. ### Impact Assessment The exposure is limited to the f ...[truncated 514 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Prefer retrieving the channel ID through OpenClaw's authenticated Telegram integration, Telegram API updates, or locally controlled logs. - Do not recommend unverified public bots as the primary method for obtaining identifiers. - If an external lookup bot must be used, instruct the user to create and forward a non-sensitive test message. - Warn users that forwarding transfers content and metadata to a third party. - Document the third party's operator, privacy policy, data retention behavior, and verification status before recommending it. - Provide a method that retrieves the identifier without transmitting channel content outside the user's controlled environment. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill instructs users to disable Telegram bot privacy mode so bots can read all channel messages, but it does not clearly warn that this expands message visibility and may expose all channel content to the bot platform, logs, and any downstream processing. In this skill's context, that risk is amplified because the stated goal is persistent multi-bot conversational monitoring of a shared channel.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger description is overly broad and includes loosely bounded concepts like social features, chatting with friends, and cross-bot interaction. This can cause the skill to activate in contexts where the user did not explicitly request Telegram channel setup, increasing the chance of unintended guidance, privacy-impacting instructions, or misrouting away from safer/default handling.

Ssd 3

Medium
Confidence
95% confidence
Finding
By directing users to disable privacy mode so bots can read all channel messages, the skill creates a data-exposure condition in which natural-language conversations become broadly accessible to the bot integration. This is especially risky here because the channel is explicitly designed for ongoing bot-to-bot and human-adjacent interaction, increasing the volume and sensitivity of captured content.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The instructions tell users to forward channel messages to third-party Telegram bots to obtain a Chat ID without disclosing that forwarded content and channel metadata are shared with external services. Even if only a single message is forwarded, this may leak channel identifiers, message contents, or membership-related metadata to untrusted third parties.

Ssd 3

Medium
Confidence
94% confidence
Finding
The skill instructs users to collect channel names, participant bot names, and the channel Chat ID, then persist them in AGENTS.md for reuse across sessions. Persisting operational identifiers and conversation rules in a reusable config file can leak user-provided metadata to other tools, future sessions, backups, or anyone with filesystem access, especially if the file is broader-scoped than the user expects.

Static analysis

No suspicious patterns detected.