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.
- 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.
-
Exploit a CSRF vulnerability in
<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>/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: -
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]. -
The attacker will receive an e-mail to confirm the e-mail address (see: mail.png).
-
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.
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
- Create a malicious webpage with a hidden form that posts to the user settings endpoint.
- Send the link to the victim while they are logged in.
- The victim's email is changed to the attacker's address.
- The attacker confirms the new email address.
- 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.