Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crititcal Telegram Driver webhook security vulnerability #99

Open
antimech opened this issue Jul 6, 2020 · 0 comments
Open

Crititcal Telegram Driver webhook security vulnerability #99

antimech opened this issue Jul 6, 2020 · 0 comments

Comments

@antimech
Copy link

antimech commented Jul 6, 2020

Hello.

Here is a security issue I've already addressed to @mpociot but I can't start working on it yet, community awareness is needed.
As we all know by default Botman Studio set all bot webhooks to route: example.com/botman
The thing is Telegram by default doesn't send any auth details to your webhook, you can't check and be sure requests are coming from them.

All of Botman Studio apps with Telegram Driver affected, anyone who knows a server running with Botman Studio and Telegram driver could send a custom update request to example.com/botman without authorization whatsoever.

This issue is not purely Telegram Driver's, here are suggested solutions:

  1. Passing optional secret_token at the webhook setup console command (for example, the Bot token itself) with the setWebhook and making a middleware to check every update authenticity.
  2. Webhook separation (from default /botman) and hardening
    example.com/botman/telegramBotToken12345
  3. Checking request origin IP with Telegram servers list (which can change over time)

Read more: https://core.telegram.org/bots/api#setwebhook

PRs are welcome.

@antimech antimech changed the title Force Telegram Driver webhook authentication (default webhook security issue) Crititcal Telegram Driver webhook security issue Jul 10, 2023
@antimech antimech changed the title Crititcal Telegram Driver webhook security issue Crititcal Telegram Driver webhook security vulnerability Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant