T09 · Insecure Skill Coding Practices
- Location
references/interactive-ui.md:9- Finding
Hard-Coded Telegram Recipient in Interactive Message Example
- Content
View full analysis
Vulnerability Details
File Location:
references/interactive-ui.md:9-25
Vulnerability Type: Hard-coded external recipient identifier
Risk Level: LowVulnerable Code
json { "action": "send", "channel": "telegram", "target": "telegram:2136878064", "message": "What would you like to do next?", "buttons": [ [ { "text": "🎨 Start Creation", "callback_data": "start_apollo" }, { "text": "📧 Check Mail", "callback_data": "check_mail" } ], [ { "text": "⚙️ Settings", "callback_data": "show_settings" }, { "text": "🌐 Visit Website", "url": "https://example.com" } ] ] }Technical Analysis
The actionable example contains the concrete Telegram recipient identifier
telegram:2136878064instead of an unmistakable placeholder or a value dynamically obtained from the active conversation. An agent or operator copying the example literally may send a message to this account rather than to the intended user.The documentation does not explicitly instruct the agent to contact this recipient, so there is no evidence of intentional data exfiltration. Nevertheless, embedding a real-looking destination in a directly reusable tool call violates safe example-design practices and creates an accidental external-disclosure channel.
Attack Path
- An agent loads this skill while handling a Telegram interaction.
- The agent consults the inline-button example.
- The agent reproduces the documented tool call without replacing the
targetfield. - OpenClaw invokes the Telegram
messagetool using the hard-coded recipient. - The message and its interactive controls are delivered to
telegram:2136878064rather than the active user.
Exploitation requires the example to be copied literally and the configured Telegram bot to be permitted to communicate with that recipient.
Impact Assessment
No additional system privileges are ...[truncated 379 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the concrete recipient with an unmistakable placeholder, such as
"target": "telegram:<ACTIVE_CHAT_ID>". - State explicitly that the target must be derived from the authenticated active conversation and must never be copied from documentation.
- Validate that the resolved recipient matches the current conversation before sending.
- For generated examples, omit
targetentirely when the tool can infer it safely from session context. - Add a pre-send confirmation when content is sensitive or when the resolved destination differs from the active chat.
- Add documentation linting that rejects concrete Telegram identifiers in reusable examples.
- Replace the concrete recipient with an unmistakable placeholder, such as
