hermes-agent/gateway/platforms
Teknium 16accd44bd
fix(telegram): require TELEGRAM_WEBHOOK_SECRET in webhook mode (#13527)
When TELEGRAM_WEBHOOK_URL was set but TELEGRAM_WEBHOOK_SECRET was not,
python-telegram-bot received secret_token=None and the webhook endpoint
accepted any HTTP POST. Anyone who could reach the listener could inject
forged updates — spoofed user IDs, spoofed chat IDs, attacker-controlled
message text — and trigger handlers as if Telegram delivered them.

The fix refuses to start the adapter in webhook mode without the secret.
Polling mode (default, no webhook URL) is unaffected — polling is
authenticated by the bot token directly.

BREAKING CHANGE for webhook-mode deployments that never set
TELEGRAM_WEBHOOK_SECRET. The error message explains remediation:

  export TELEGRAM_WEBHOOK_SECRET="$(openssl rand -hex 32)"

and instructs registering it with Telegram via setWebhook's secret_token
parameter. Release notes must call this out.

Reported in GHSA-3vpc-7q5r-276h by @bupt-Yy-young. Hardening — not CVE
per SECURITY.md §3 "Public Exposure: Deploying the gateway to the
public internet without external authentication or network protection"
covers the historical default, but shipping a fail-open webhook as the
default was the wrong choice and the guard aligns us with the SECURITY.md
threat model.
2026-04-21 06:23:09 -07:00
..
qqbot refactor: remove redundant local imports already available at module level 2026-04-21 00:50:58 -07:00
ADDING_A_PLATFORM.md
…
__init__.py
…
api_server.py refactor: remove redundant local imports already available at module level 2026-04-21 00:50:58 -07:00
base.py fix(agent): normalize socks:// env proxies for httpx/anthropic 2026-04-21 05:52:46 -07:00
bluebubbles.py refactor: remove remaining redundant local imports (comprehensive sweep) 2026-04-21 00:50:58 -07:00
dingtalk.py
…
discord.py refactor: remove redundant local imports already available at module level 2026-04-21 00:50:58 -07:00
email.py
…
feishu.py feat(feishu): show processing state via reactions on user messages 2026-04-20 02:04:57 -07:00
feishu_comment.py
…
feishu_comment_rules.py
…
helpers.py
…
homeassistant.py
…
matrix.py fix(gateway): accept finalize kwarg in all platform edit_message overrides 2026-04-19 22:46:47 -07:00
mattermost.py refactor: remove redundant local imports already available at module level 2026-04-21 00:50:58 -07:00
signal.py fix(gateway): prevent scoped lock and resource leaks on connection failure 2026-04-20 01:44:36 -07:00
slack.py refactor: remove redundant local imports already available at module level 2026-04-21 00:50:58 -07:00
sms.py
…
telegram.py fix(telegram): require TELEGRAM_WEBHOOK_SECRET in webhook mode (#13527) 2026-04-21 06:23:09 -07:00
telegram_network.py
…
webhook.py fix(webhook): validate HMAC signature before rate limiting (#12544) 2026-04-19 22:45:08 -07:00
wecom.py refactor: remove redundant local imports already available at module level 2026-04-21 00:50:58 -07:00
wecom_callback.py
…
wecom_crypto.py
…
weixin.py
…
whatsapp.py refactor: remove remaining redundant local imports (comprehensive sweep) 2026-04-21 00:50:58 -07:00