Back to skill

Security audit

电报聊天工具免费版

Security checks for vulnerabilities and agentic risk

Overview

This Telegram bot guide is not deceptive, but it asks users to grant broad group-message access and suggests a third-party helper bot without enough privacy and permission warnings.

Install only if you are comfortable with a Telegram bot having access to the configured group messages. Keep privacy mode enabled unless all-message monitoring is truly required, avoid granting administrator rights unless a specific admin action is needed, restrict allowed_chats, store the bot token as a secret, rotate it if exposed, and avoid forwarding private group messages to @userinfobot.

Vulnerability Patterns
  • 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
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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 (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:205
Finding

Excessive Telegram Group Permissions and Unrestricted Message Access

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 205-210
Vulnerability Type: Excessive privileges and weakened privacy controls
Risk Level: Medium

Relevant excerpt translated into English:

text
2. Set the bot as a group administrator so it can receive all messages.
3. Disable the bot's privacy mode:
   - Send /mybots to @BotFather
   - Select the bot
   - Open Bot Settings -> Group Privacy
   - Select Turn off

Technical Analysis

The Skill instructs users to grant the Telegram bot group administrator status and disable Group Privacy. These settings collectively give the bot broad visibility into group activity and potentially grant administrative capabilities beyond those required for basic mention-based responses.

Disabling Group Privacy allows the bot to receive ordinary group messages rather than only commands, replies, and messages explicitly directed to it. Administrator status is not generally required merely to receive all messages after privacy mode has been disabled. The guide does not identify a specific administrative function that justifies this privilege or prescribe a minimal set of administrator permissions.

This violates the principle of least privilege. The exposure becomes security-significant if the bot token, hosting environment, agent runtime, or bot implementation is compromised.

Attack Path

  1. An operator follows the Skill and adds the bot to a Telegram group.
  2. The operator grants the bot administrator status without restricting individual administrator permissions.
  3. The operator disables Group Privacy, allowing the bot to receive ordinary group conversations.
  4. An attacker obtains the bot token or compromises the runtime processing Telegram updates.
  5. The attacker uses the bot's access to monitor available group messages.
  6. Depending on the administrator rights selected during setup, the attacker may also perform administrative actions such ...[truncated 744 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not instruct users to grant administrator status for ordinary message reception.
  • Keep Group Privacy enabled by default and use commands, replies, or explicit bot mentions where possible.
  • If all-message processing is essential, explain the resulting confidentiality exposure before instructing users to disable privacy mode.
  • Document each required Telegram permission and explicitly disable every unrelated administrator capability.
  • Recommend using a dedicated test group before deployment to production groups.
  • Apply the existing allowed_chats restriction as a mandatory allowlist rather than an optional example.
  • Ensure the bot rejects updates from chat IDs that are not explicitly authorized.
  • Store the bot token in a secret manager or protected environment variable instead of a broadly readable configuration file.
  • Regularly rotate the token and audit the groups and privileges assigned to the bot.

other

Warning
Location
SKILL.md:253
Finding

Potential Disclosure of Group Messages to a Third-Party Telegram Bot

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 253-254
Vulnerability Type: Third-party data disclosure
Risk Level: Medium

Relevant excerpt translated into English:

text
# Method 2: Use @userinfobot
# Search for @userinfobot in Telegram and forward the group message to it to obtain the ID.

Technical Analysis

The Skill recommends forwarding a group message to the externally operated @userinfobot account to determine a Telegram group ID. Forwarding a message can disclose message content and Telegram metadata to a third party outside the audited project and outside the original group.

The document does not establish who operates the external bot, what data it records, how long it retains information, or whether group participants have consented to the transfer. It also does not warn users to select a non-sensitive test message.

This method is unnecessary because the same document provides an official Telegram API approach using getUpdates. The third-party recommendation therefore introduces avoidable data exposure.

Attack Path

  1. A user needs to determine a private group's Telegram chat ID.
  2. Following the Skill, the user forwards a message from that group to @userinfobot.
  3. The external bot receives the forwarded content and available metadata.
  4. The external service may process, log, retain, correlate, or disclose the received information.
  5. If a sensitive message is selected, private group information leaves the intended trust boundary without the knowledge of other participants.

Impact Assessment

The external bot may receive the selected message's contents and associated Telegram metadata. The exact metadata Telegram exposes can depend on forwarding restrictions and platform behavior.

Potential consequences include:

  • Disclosure of confidential group content.
  • Exposure of group, sender, or participant identifiers.
  • Correlation of a user with a pri ...[truncated 331 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove the recommendation to forward group messages to an externally operated bot.
  • Prefer the official Telegram Bot API getUpdates method already documented by the Skill.
  • Provide instructions for identifying the chat ID from locally inspected update data without sending information to another service.
  • Redact the bot token from terminal history, logs, screenshots, and support requests when demonstrating API calls.
  • If a third-party helper remains documented, clearly identify it as an external service and explain the privacy implications.
  • Require users to forward only a purpose-created, non-sensitive test message after obtaining any necessary participant or organizational approval.
  • Advise users to review Telegram's forwarding restrictions and the external service's ownership, privacy policy, and retention practices before use.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (8)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 251)May include surrounding context.

bash
# 方法一:通过 Telegram API 获取
curl "https://api.telegram.org/bot配置值/getUpdates" | python3 -m json.tool
# ...
# 方法二:使用 @userinfobot
# 在 Telegram 中搜索 @userinfobot,将群组转发给它即可获取 ID

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description explicitly includes '跨 Bot 实例消息通信', and the body repeatedly describes communication among different Bot instances. However, the FAQ later states '免费版支持单个 Bot 的配置与使用', which narrows the free edition to a single Bot. These statements conflict about whether multi-Bot capability is actually in scope for the free version.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs users to disable Telegram group privacy mode so the Bot can read all group messages, but it does not prominently warn that this expands collection of potentially sensitive group content. In an agent context, that can lead to unintended data exposure, broader message ingestion, and privacy violations for users who did not expect full-group monitoring.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document tells users to configure and store a Bot Token in local configuration but does not place strong security guidance at the setup step. Bot tokens are high-value secrets; if copied into logs, repos, chat transcripts, or shared config files, an attacker can hijack the Bot, read/update messages within its permissions, and impersonate the service.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The group notification scenario presents the Bot as sending meeting notices to a team group, which reads as active outbound messaging. Later, Q6 says the free edition only responds after being mentioned or receiving a message, and that proactive push messaging is a PRO feature. This is an active contradiction in the skill's own documentation about intended behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

L191 将触发条件描述为“需要消息发送、通知推送、邮件短信、通信集成时使用”,其中“消息发送”“通知推送”等表述非常宽泛,且还扩展到文档其余部分未明确支持的“邮件短信”。这类日常高频需求缺少清晰边界,容易让代理在不适合的场景下错误调用该技能。

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 251)May include surrounding context.

bash
# 方法一:通过 Telegram API 获取
curl "https://api.telegram.org/bot配置值/getUpdates" | python3 -m json.tool
# ...
# 方法二:使用 @userinfobot
# 在 Telegram 中搜索 @userinfobot,将群组转发给它即可获取 ID

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 365)May include surrounding context.

bash
# 方法一:通过 Telegram API 获取
curl "https://api.telegram.org/bot配置值/getUpdates" | python3 -m json.tool
# ...
# 方法二:使用 @userinfobot
# 在 Telegram 中搜索 @userinfobot,将群组转发给它即可获取 ID

Static analysis

No suspicious patterns detected.