Skip to content
CSRF Disclosed report Beginner

Full account takeover using CSRF and password reset

A CSRF vulnerability in the user settings endpoint allowed an attacker to change a victim's email address without their consent. The attacker could then use the password reset feature to take over the account.

melvin Follow

Originally disclosed on HackerOne

  • Triaged in 39 hours
  • Fixed in 41 hours
  • Paid in 41 hours
  • Disclosed after 4 days

An attacker could take over any user account by doing the following things.

  1. Exploit a CSRF vulnerability in /chat/user-settings. An attacker creates a webpage on a (non-IRCCloud) website (for example: http://example.com/cat.html) and inserts a (hidden) form like this:

    <form action="https://www.irccloud.com/chat/user-settings" method="post"> <input type="hidden" name="email" value="[email protected]"> <input type="hidden" name="realname" value="Doesn't Matter"> <input type="hidden" name="hwords" value=""> <input type="hidden" name="autoaway" value="1"> <input type="hidden" name="reqid" value="1"> <input type="hidden" name="session" value=""> <input type="submit"> <!-- some code to make the form submit automatically, in the background--> </form>
  2. The attacker will send a link to the page to the victim. When the victim is logged in to IRCCloud, and clicks the link to the page, the e-mail of the victim on IRCCloud will be updated (in the background) to [email protected].

  3. The attacker will receive an e-mail to confirm the e-mail address (see: mail.png).

  4. The attacker can now use the password reset functionality to change the password of the victim's account and gain full control over the account.

The original report as published on HackerOne, by melvin. 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 user settings endpoint did not require a CSRF token or other anti-CSRF protection, allowing cross-site form submissions to change account details.

Impact

An attacker could take over any user account by changing the victim's email and then resetting the password.

What the attacker needed

Victim is logged in; victim clicks a link

How it was found

  1. Create a malicious webpage with a hidden form that posts to the user settings endpoint.
  2. Send the link to the victim while they are logged in.
  3. The victim's email is changed to the attacker's address.
  4. The attacker confirms the new email address.
  5. The attacker uses password reset to change the victim's password.

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.

This report shows how a website failed to protect a form that changes account settings. An attacker could trick a logged-in user into submitting a hidden form that changes their email to the attacker's address. Then the attacker used the 'forgot password' feature to reset the password and take over the account.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by melvin

View all

12 more disclosed reports, best first.

More from IRCCloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.