T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:17- Finding
Global Open Telegram Group Policy Bypasses Explicit Group Authorization
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 17-31
Vulnerability Type:T05: Unauthorized Access and Privilege Escalation
Risk Level: HighVulnerable code snippet:
markdown **Recommended fix:** Set `channels.telegram.groupPolicy: "open"` at the top level. This is safe when `dmPolicy: "pairing"` is active - strangers can't DM the bot without pairing first, and they can only interact in groups they're already a member of. With `groupPolicy: "open"`, new groups work immediately without manual allowlisting. ```json5 { "channels": { "telegram": { "dmPolicy": "pairing", // strangers must pair first "groupPolicy": "open", // groups work automatically // ... } } }text ### Technical Analysis The skill recommends setting the top-level Telegram `groupPolicy` to `open` and claims that this is safe when direct-message pairing is enabled. Direct-message authorization and group authorization are separate trust boundaries: `dmPolicy: "pairing"` restricts direct conversations but does not authorize or restrict group interactions. A globally open group policy removes the explicit allowlist requirement for existing and future Telegram groups. The skill documentation further indicates that an open policy permits any group member to trigger the bot. Consequently, direct-message pairing does not compensate for the loss of group-level authorization. This recommendation conflicts with least-privilege principles because access is granted to all groups rather than only to a group whose identity and ownership have been explicitly verified. ### Attack Path 1. An administrator applies the documented recommendation and sets the top-level `groupPolicy` to `open`. 2. An attacker adds the bot to a Telegram group or interacts from an existing group containing the bot. 3. The attacker sends instructions to the bot without obtaining direct-message pairing or ...[truncated 788 chars]- Remediation
View remediation
Remediation Suggestions
- Retain
channels.telegram.groupPolicy: "allowlist"as the secure default. - Require explicit owner or administrator approval for each Telegram chat ID before adding it to the configuration.
- Verify the group identity and expected administrator before changing authorization.
- Clearly document that
dmPolicy: "pairing"governs direct messages only and does not secure group interactions. - Default each group to
requireMention: true, requiring an explicit, informed decision before enabling responses to every message. - Apply least-privilege controls to tools available through group conversations, even for allowlisted groups.
- Record and audit group authorization changes, including the approving identity, chat ID, and time of approval.
- Retain
