0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 19:02:51 +08:00
discourse/spec/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
..
email_polling_errored_recently_spec.rb
facebook_config_spec.rb
failing_emails_spec.rb
force_https_spec.rb FIX: Fix scheduled targeted problem checks (#35696) 2025-11-10 10:09:14 +08:00
github_config_spec.rb
google_analytics_version_spec.rb
google_oauth2_config_spec.rb
group_email_credentials_spec.rb DEV: Remove IMAP support in Discourse (#37002) 2026-01-12 10:07:26 +10:00
host_names_spec.rb
image_magick_spec.rb
maxmind_db_configuration_spec.rb DEV: Database backed admin notices (#26192) 2024-05-23 09:29:08 +08:00
missing_aws_sns_topic_arn_spec.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_spec.rb FIX: Amend broken Mailgun API key check (#26206) 2024-03-18 09:10:30 +10:00
out_of_date_themes_spec.rb
rails_env_spec.rb
ram_spec.rb
s3_backup_config_spec.rb
s3_cdn_spec.rb
s3_upload_config_spec.rb
sidekiq_check_spec.rb DEV: Promote block problem checks to ProblemCheck (#26193) 2024-03-20 08:52:25 +08:00
starttls_disabled_spec.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_spec.rb
translation_overrides_spec.rb DEV: Catch missing translations during test runs (#26258) 2024-05-24 22:15:53 +08:00
twitter_config_spec.rb
twitter_login_spec.rb
unreachable_themes_spec.rb
upcoming_change_stable_opted_out_spec.rb FIX: Fix scheduled targeted problem checks (#35696) 2025-11-10 10:09:14 +08:00
watched_words_spec.rb