Skip to content

[Security] Telegram Bridge command injection #118

Closed

Description

@im23pds

Telegram Bridge Command Injection

File: scripts/telegram-bridge.js:86-88

Problem: User messages are directly appended to SSH commands.

const escaped = message.replace(/'/g, "'\''");
const cmd = export NVIDIA_API_KEY='${API_KEY}' && nemoclaw-start openclaw agent --agent main --local -m '${escaped}' --session-id 'tg-${sessionId}';

Impact: Attackers can execute commands within the sandbox by sending malicious messages.
API Key may be compromised.

Exploitation Requirements:
Requires obtaining a Telegram Bot Token.
Requires being configured in the whitelist (or not having ALLOWED_CHAT_IDS configured).
Requires knowing the sandbox name.

Remediation Recommendations: Use parameterized messaging. Implement strict whitelist validation for user input.

Activity

  1. added 2 commits that reference this issue on Mar 17, 2026
    10a0335
    7b1dfd9
  2. im23pds commented on Mar 17, 2026

    @im23pds
    Author

    thanks Fix

    @23pds
    SlowMist CISO

  3. added a commit that references this issue on Mar 18, 2026
    fa74697
  4. ericksoa commented on Mar 23, 2026

    @ericksoa
    Member

    Tracking upstream as openclaw/openclaw#16323, which covers the broader attack surface of untrusted messaging platform users reaching shell execution paths. We're working with the OpenClaw team to address this — closing in favor of tracking there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions