Change user settings through CSRF
The settings page accepted POST requests without a CSRF token, so a page on another site could submit a form that changed the victim's real name. The reporter suggests that if the email address could be changed the same way, an attacker could take over the account.
- Disclosed after 30 days
Hello,
it's trivial to change the user settings. Just use this HTML code:
<html> <head></head> <body> <form action="http://www.localize.io/pages/settings" method="post"> <input type="text" name="settings[realName]" value="otherusername"> <input type="submit" value="Submit"> </form> </body> </html>In addition with some Javascript code that submits the form automatically, making the user visit the snipped of code above will change their user settings. If their e-mail address is altered too, and the adversary gets a verification e-mail after he changes the user's e-mail to his e-mail, it's easy to take over an account.
I also recommend enabling HTTPS and disallowing regular HTTP.
Greets
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 settings endpoint accepted state-changing POST requests without a CSRF token or origin check.
Impact
An attacker could change a logged-in user's real name, and the reporter suggests that if the email address could also be changed, account takeover may be possible.
What the attacker needed
Victim is logged in; victim visits attacker page
The fix
The site should enforce HTTPS and disallow regular HTTP.
How it was found
- Create an HTML page containing a form that posts to the settings endpoint with a new real name.
- Add JavaScript that submits the form automatically when the page loads.
- Get the victim to visit the page while logged in, which changes their settings.
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 page on another site can submit a form to the settings endpoint and change the victim's real name while they are logged in.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.