Skip to content
Account takeover Disclosed report Intermediate CVE-2022-32211

Regex account takeover

A low-privilege user could access an admin's password reset token and set a new password for the admin account. The attacker could then gain admin access and escalate their own privileges.

ghaem51 Follow

Originally disclosed on HackerOne

Critical 9.9 View original
  • Triaged in 10 hours
  • Fixed in 19 days
  • Disclosed after 4 months

Summary by the program

Summary: get admin reset token with authenticated user

Description: normal user login can access to admin reset token and set a new password for admin user

Releases Affected:

  • 3.18.5
  • 3.0.5

Steps To Reproduce (from initial installation to vulnerability):

(Add details for how we can reproduce the issue)

  1. login with low privilege user
  2. copy rc_uid and rc_token for script
  3. request for admin email password you can find admin mail with the script
  4. run python script to get reset token with "blind no SQL injection" ( regex search )

Supporting Material/References:

Suggested mitigation

  • [list any suggested patches or steps to mitigate the problem]

Impact

the attacker could gain admin access and escalate their own user

Fix

3.18.6, 4.4.4 and 4.7.3>

The original report as published on HackerOne, by ghaem51. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application did not properly restrict access to password reset tokens, allowing any authenticated user to retrieve an admin's reset token.

Impact

The attacker could gain admin access and escalate their own user privileges.

What the attacker needed

A low-privilege user account; ability to run a script

The fix

The fix is listed for versions 3.18.6, 4.4.4 and 4.7.3.

How it was found

  1. Log in with a low-privilege user account.
  2. Copy the rc_uid and rc_token values for use in a script.
  3. Request the admin email password and find the admin email using the script.
  4. Run a Python script to obtain the reset token using a blind NoSQL injection with regex search.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A normal user account could see a secret code meant only for resetting an administrator's password. By using that code, the attacker could change the admin's password and take over the admin account.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More from Rocket.Chat

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.