0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-08 13:25:19 +08:00
discourse/spec/services/problem_check
Nat 61f12e13aa SECURITY: Prevent any signed AWS SNS TopicARN from being accepted via webhooks
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:10:52 +02:00
..
content_security_policy_disabled_spec.rb FEATURE: Warn admins when Content Security Policy is disabled (#40791) 2026-06-11 11:34:37 +01:00
email_polling_errored_recently_spec.rb
email_sending_failures_spec.rb FEATURE: Add PM whisper feedback for email sending failures (#40250) 2026-05-22 17:17:15 -03:00
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
github_onebox_backoff_spec.rb FEATURE: Route all GitHub API requests through one rate-limited client (#40637) 2026-06-15 10:59:10 +02:00
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
missing_aws_sns_topic_arn_spec.rb SECURITY: Prevent any signed AWS SNS TopicARN from being accepted via webhooks 2026-06-30 16:10:52 +02:00
missing_mailgun_api_key_spec.rb Revert "DEV: Replace MissingMailgunApiKey check with comprehensive Em… (#38038) 2026-02-24 19:38:30 +00:00
out_of_date_themes_spec.rb
qq_mail_smtp_spec.rb FEATURE: Warn admins when QQ Mail SMTP is configured 2026-01-30 16:39:24 +00:00
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
starttls_disabled_spec.rb
subfolder_ends_in_slash_spec.rb
translation_overrides_spec.rb
twitter_config_spec.rb
twitter_login_spec.rb
unreachable_themes_spec.rb
upcoming_change_stable_opted_out_spec.rb DEV: Remove enable_upcoming_changes global setting gate (#38360) 2026-03-10 10:08:20 +10:00
watched_words_spec.rb