0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-12 05:37:26 +08:00
discourse/app/services/problem_check
Nat 3a3d315a85 SECURITY: Prevent any signed AWS SNS TopicARN from being accepted via webhooks [backport 2026.1]
Manual backport of #732 to 2026.1. Conflict in server.en.yml (no qq_mail_smtp line on this branch) resolved.
  GHSA-8f9m-v436-wr3x

---

Any AWS account holder can subscribe their own SNS topic to a Discourse instance's /webhooks/aws and publish bounce notifications that AWS will sign legitimately. The forged bounces are processed against arbitrary user emails, bumping bounce_score and eventually triggering email revocation..

This fix adds a new `aws_sns_topic_arn_allowlist` site setting. Also hardens Jobs::ProcessSnsNotification against three issues:
- Binds bounces to (message_id, to_address) via find_by, so a legitimately-subscribed SNS publisher can no longer bounce arbitrary recipients we didn't send to.
- Skips duplicate notifications (next if email_log.bounced?) — AWS SNS delivers at-least-once.
- Uses update! instead of update_columns so EmailLog's existing before_save normalizes the bounce status code.

Also add a dashboard problem flags self-hosted admins whose SMTP looks like SES but who haven't set the allowlist yet.

https://github.com/discourse/discourse/security/advisories/GHSA-8f9m-v436-wr3x
2026-06-30 16:27:06 +02:00
..
bad_favicon_url.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
email_polling_errored_recently.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
facebook_config.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
failing_emails.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
force_https.rb FIX: Fix scheduled targeted problem checks (#35696) 2025-11-10 10:09:14 +08:00
github_config.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
google_analytics_version.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
google_oauth2_config.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
group_email_credentials.rb DEV: Remove IMAP support in Discourse (#37002) 2026-01-12 10:07:26 +10:00
host_names.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
image_magick.rb DEV: replace imagemagick convert commands with magick (#27767) 2024-07-08 16:55:59 +08:00
inline_problem_check.rb FIX: Don't clear inline problems when loading admin dashboard (#28220) 2024-08-05 11:45:55 +08:00
maxmind_db_configuration.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
missing_aws_sns_topic_arn.rb SECURITY: Prevent any signed AWS SNS TopicARN from being accepted via webhooks [backport 2026.1] 2026-06-30 16:27:06 +02:00
missing_mailgun_api_key.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
out_of_date_themes.rb FIX: Fix broken out of date themes admin notice (#27916) 2024-07-15 16:12:44 +08:00
poll_pop3_auth_error.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
poll_pop3_timeout.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
problem.rb DEV: Support target in problem check problem constructor (#31922) 2025-03-24 10:10:41 +08:00
rails_env.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
ram.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
s3_backup_config.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
s3_cdn.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
s3_upload_config.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
sidekiq_check.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
starttls_disabled.rb FIX: actually disable SMTP starttls if the user is attempting to disable it 2025-11-04 23:42:14 -05:00
subfolder_ends_in_slash.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
translation_overrides.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
twitter_config.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
twitter_login.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
unreachable_themes.rb FIX: Fix broken out of date themes admin notice (#27916) 2024-07-15 16:12:44 +08:00
upcoming_change_stable_opted_out.rb FEATURE: Automatic promotion of upcoming changes (#36211) 2025-12-08 15:49:34 +10:00
watched_words.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00