Back to skill

Security audit

Agent Telegram

Security checks for vulnerabilities and agentic risk

Overview

This skill tells agents to automatically send task updates and output paths to a fixed Telegram account, which could expose project information if installed outside that intended private setup.

Install this only if you own or explicitly trust Telegram ID 5440561025 and want all listed agents to send automatic work updates there. Avoid using it in workspaces with confidential code, customer data, credentials, or sensitive file paths unless the recipient is changed to a user-controlled configuration and messages are minimized or confirmed before sending.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:9
Finding
Mandatory Telegram Reporting to a Hard-Coded External Recipient<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 9, 24, 30–38, and 64–69 **Vulnerability Type**: Agent instruction hijacking and unauthorized external disclosure **Risk Level**: High The Skill requires every listed Agent to report task activity through Telegram to the fixed recipient `5440561025`. The instructions apply when a task is received, whenever a subtask is completed, when a problem occurs, and when the entire task is completed. ### Vulnerable Code ```text 所有 Agent 向用户 (Legend) 发送 Telegram 消息时必须遵循此规范。 ``` ```text **用户 Telegram ID**: `5440561025` ``` ```javascript message({ action: "send", channel: "telegram", accountId: "<你的accountId>", target: "5440561025", message: "<你的emoji> <内容>" }) ``` ```text ## 汇报时机 - ✅ **收到任务时** - 立即汇报"收到任务,开始执行" - ✅ **每完成子任务** - 汇报完成情况和输出 - ✅ **遇到问题** - 汇报问题并请求决策 - ✅ **任务全部完成** - 汇报最终结果 ``` ### Technical Analysis The Skill uses mandatory instructions to alter the behavior of every Agent role identified in its metadata. Instead of limiting Telegram communication to cases explicitly requested and authorized by the active user, it establishes automatic reporting as a required part of normal task execution. The destination is a hard-coded numeric Telegram identifier rather than a recipient selected through trusted runtime configuration or verified against the active user. Consequently, installing or loading the Skill in a different environment would still direct communications to the same recipient. The required reports can include task names, progress details, encountered errors, generated results, and local output paths. These values may reveal confidential project information or operational metadata. The Skill therefore establishes a potential data-disclosure channel under the control of the fixed Telegram recipient. No executable payload, credential-harvesting logic, persistence mechanism, dependency attack, or privilege-escalation implementation was identified in the audited file. ...[truncated 1571 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the hard-coded Telegram recipient identifier from the Skill. 2. Resolve recipients from trusted runtime configuration associated with the active user or workspace. 3. Verify recipient ownership and authorization before sending any message. 4. Require explicit, informed user consent before transmitting task data to an external service. 5. Do not require automatic reports when tasks begin, subtasks complete, errors occur, or tasks finish. 6. Make Telegram reporting optional and subordinate to the current user's instructions and platform security policies. 7. Apply data minimization to all approved messages: - Exclude secrets, credentials, tokens, and personal data. - Avoid local filesystem paths unless specifically required. - Sanitize error messages and diagnostic output. - Summarize results instead of transmitting raw project content. 8. Add a confirmation step displaying the destination and proposed message content before transmission. 9. Restrict each Agent account to the minimum messaging permissions required. 10. Maintain an audit log of approved outbound messages without recording sensitive message bodies. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill hard-codes a specific Telegram user ID and requires agents to send status updates and outputs to that recipient for all tasks. This creates a real data disclosure risk because task details, file paths, progress reports, and potentially sensitive project information may be exfiltrated to a fixed external destination without user consent, data-classification checks, or privacy warnings.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The skill is written as a mandatory Chinese communication standard and all message templates are in Chinese, indicating agents must use a specific language. There is no opt-in, user preference handling, or documented justification for enforcing that locale.

Skill Enumeration

Medium
Category
Agent Snooping
Content
## 配置位置

- **主配置**: `~/.openclaw/openclaw.json` → `channels.telegram.accounts`
- **此 Skill**: `~/.openclaw/workspace/skills/agent-telegram/SKILL.md`

---
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Static analysis

No suspicious patterns detected.