Skip to content
CSRF Disclosed report Beginner

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.

guido Follow

Originally disclosed on HackerOne

  • 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

The original report as published on HackerOne, by guido. 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 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

  1. Create an HTML page containing a form that posts to the settings endpoint with a new real name.
  2. Add JavaScript that submits the form automatically when the page loads.
  3. 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.

More by guido

View all

49 more disclosed reports, best first.

More from Localize

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.