Back to skill

Security audit

Tg Cli

Security checks for vulnerabilities and agentic risk

Overview

Scanners rate this Telegram skill suspicious because its documented capabilities and activation reach beyond the stated Telegram purpose, with concerns about broad access and actions that may lack enforced approval.

Consider whether you want a Telegram skill that also reaches notes and Drive, manages tasks and contact metadata, exposes broad bot operations, or can delete topics. Review the MCP permission setup carefully because “ask” may depend on the client to enforce approval. The scan is partial: two local references could not be resolved, so the evidence is incomplete.

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
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
Findings (17)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Most commands support the declared Telegram functionality. However, search all explicitly expands access to notes and Drive documents, which the description does not disclose. Restricting that command to owner-requested use does not eliminate the resource-access mismatch. Local archive searching and thread reconstruction are supporting implementation details, not separate mismatches.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Inbox reading and conversation review fit the declared Telegram purpose. However, much of the supplied command reference supports a separate task-management system that changes persistent task state, rather than merely searching history or reading and sending messages. Commands such as tasks add, tasks merge, tasks claim, and tasks close introduce capabilities not disclosed in the description. Owner-approval safeguards constrain some operations but do not eliminate this mismatch. The chunk is a command reference, not evidence that these commands have actually been executed.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

Contact lookup and metadata retrieval are reasonable supporting operations for finding people and answering questions from chats. However, the chunk also includes persistent changes to contact annotations and chat categorization. These are distinct management capabilities not disclosed by the description's read, search, setup, and message-sending scope.

Content

No source excerpt is available for this finding.

Context Leakage

High
Category
Data Exfiltration
Confidence
85% confidence
Finding

Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Content

Scanner excerpt · references/messages.md (reported line 70)May include surrounding context.

md
## Telegram drafts

`tg personal messages send CHAT "text" --draft` saves a draft for the owner to review and send in Telegram.
It replaces any existing draft in that chat/topic, so confirm the intended replacement when needed.
It sends no message and uses the separate `drafts` permission. Formatting, `--reply-to`, `--topic` and
`--no-preview` work; empty text, attachments, scheduling and other send-only flags are refused.

The skill exposes permanent deletion of a forum topic and all its messages for everyone, beyond its stated reading and messaging purpose.

High
Category
Excessive Agency
Confidence
94% confidence
Finding

The manifest describes answering questions, setting up Telegram, finding chats or people, and reading or sending messages. The documented topics delete operation instead permanently destroys an entire topic's history for all participants; requiring explicit authorization reduces accidental use but does not make this destructive group-administration capability part of the declared purpose.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/setup.md (reported line 75)May include surrounding context.

md
printed, paste it and say the old one expired. With `--json` each code is also a stderr line
`{"event":"qr","qr":{"text","expires_at","scan"}}`. Login is not an MCP tool: with only MCP, ask
the owner to run the command in a terminal or to sign in from WireCat Desktop (Tools → Telegram → Manage).
Existing sessions are checked without a new login. Missing keyring access
requires fixing the environment, not another login. Pick a chat and an amount of history with
the owner before `tg personal messages sync <chat> --last 100`; setup starts no background service.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/tasks.md (reported line 50)May include surrounding context.

md
Reply controls: `tg personal replies add|edit|on|off` edit local rules; `replies audience` controls file-level
allow/deny lists (deny wins). `test` previews stored messages without sending; `status`, `pause` and
`resume` control the profile's rules. Liquid reads sender/chat facts only; incoming text goes to a
model only inside ai blocks. Ordinary previews show instruction/fallback with no model call;
`test --ai` explicitly uses a consented provider. `replies consents grant|revoke` controls profile/
endpoint consent and `deny|allow` controls native chat opt-outs. Never widen the audience or run live
scenarios without the owner's separate consent. Shared `serve` replies to everyone a rule matches unless the audience limits it, and only with explicit

The activation description extends to ordinary questions without a clear Telegram-related intent.

Medium
Category
Trigger Abuse
Confidence
97% confidence
Finding

The activation description directs the agent to search private Telegram history for ordinary questions even without clear Telegram-related intent. This can unnecessarily expose private conversations to the agent context and, depending on search configuration, transmit the user's question to remote search or embedding services.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
86% confidence
Finding

The documented MCP behavior allows writes under an 'ask' permission without server-side confirmation, relying on the client to supply an approval prompt. Merely telling the owner to enable client approval does not enforce it, so an unconfigured client can turn approval-required actions into unconfirmed account writes.

Content

Scanner excerpt · references/mcp-and-bots.md (reported line 22)May include surrounding context.

md
An agent without a terminal (Claude Desktop, Cursor) uses the MCP server instead: `tg personal mcp serve`. The
profile's `permissions` decide which commands may run, through `tg_tools_search`, `tg_read` and
`tg_write`. Discovery keeps denied commands and their arguments, marking current unavailability
with a reason and permission key. There is no confirmation form: approval for a write is the MCP client's, so ask
the owner to turn it on. `tg personal mcp config` prints the entry with full paths.

`tg personal mcp serve --http --public-url https://<name>.ts.net` serves behind your tunnel with its own owner-code login;

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The source explicitly equates 'ask' with 'allow' for MCP writes, including the HTTP-serving configuration. Authentication identifies the client but does not replace per-action approval, leaving approval-required messaging or destructive operations unconfirmed if client prompts are absent.

Content

Scanner excerpt · references/mcp-and-bots.md (reported line 26)May include surrounding context.

md
the owner to turn it on. `tg personal mcp config` prints the entry with full paths.

`tg personal mcp serve --http --public-url https://<name>.ts.net` serves behind your tunnel with its own owner-code login;
MCP has no server forms. `deny`/`readonly` block writes; `ask`/`allow` permit the requested write without asking,
so the client's approval is the only prompt.
Repeat `--permission key=level` to tighten permissions for the server; it never loosens them. Never change permissions to bypass a refusal.
`tg personal mcp revoke` forgets browser logins for the profile.

The unrestricted native Bot API surface includes financial operations and managed-bot credential replacement unrelated to personal-history search or messaging.

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

The manifest describes searching the owner's Telegram history and reading or sending messages through their personal account. These instructions additionally expose all Bot API methods, explicitly including financial operations and managed-bot token replacement—capabilities not justified by that stated purpose. Default approval and secure token storage mitigate execution risks but do not resolve the scope mismatch.

Content

No source excerpt is available for this finding.

Contact reputation checks disclose Telegram IDs to external spam registries, beyond the manifest's messaging and history-search purpose.

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

L25–L26 describe a capability that sends a person's Telegram ID to CAS and lols.bot. Checking external spam reputations is not necessary to search Telegram history, identify contacts, or read and send messages. The instruction to obtain owner acceptance mitigates unexpected disclosure but does not bring this capability within the manifest's stated scope.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/people.md (reported line 51)May include surrounding context.

md
changing the chat. Dry-run uses cached data only and cannot be combined with refresh. Limit is
bounded at 500 chats. A rule score is not a probability. Automatic claims are separate from manual
labels; rerunning preserves manual labels. Without `--claim`, removing a label removes both claims.
A later explicit auto run can regenerate it. Linking identities never silently combines private notes.

Phones, e-mail addresses, links and Google documents written in stored messages are kept as mentions, found
by rules on every store write. `mentions list` takes a query: `kind:phone|email|url|document`,

The search workflow extends beyond Telegram history to personal notes and imported Google Drive documents.

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The manifest describes answering questions from Telegram history and managing the owner's Telegram account. Lines L017–L019 instead instruct the agent to use search all to search personal notes and imported Drive documents, including selecting a registered Drive profile. Requiring an explicit owner request limits unintended access, but these additional data sources still exceed the manifest's stated Telegram-only purpose.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/setup.md (reported line 52)May include surrounding context.

md
use the one-call installer from the installation guide: it repairs user and current-shell PATH,
installs the skill even with disabled lifecycle scripts and verifies bare `tg`. Read `tg skill show`
and verify your skill is loaded before login. If your process predates installation, refresh your
shell PATH from the user/machine environment yourself; do not ask the user to edit PATH.

## First setup

Session Persistence

Medium
Category
Rogue Agent
Confidence
55% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/stats.md (reported line 19)May include surrounding context.

md
`stats contacts responses --answerer <person>`. Known-join newcomer help is `stats chats newcomers <chat>`;
viewed posts with little stored discussion are `stats messages discussion`. Inspect graph/archive
quality and use each row’s exact `selection` with `--component report`; missing history/join dates
are not zero. All four reports read stored data; do not infer historical administrator roles.

Retention: `tg personal stats chats retention <chat> --checkpoints 1d,7d,30d --within 7d --json`.
Only a known join date defines cohorts. Report observable denominators, unknown/pending and actual snapshot time.

Picture-search queries are required to be English without user opt-in or an explicit technical justification.

Low
Category
Output Handling
Confidence
88% confidence
Finding

The instructions mandate English picture queries and require translating the owner's words first. Although scoped to search queries rather than user-facing replies, this imposes a specific natural language without offering a choice or explicitly explaining why the search model requires it.

Content

No source excerpt is available for this finding.