Skip to content
CSRF Write-up Beginner

CSRF account takeover Explained Automated/Manual — Bug Bounty

The account settings form on the site accepted profile changes without a valid anti-CSRF token, so a page hosted elsewhere could submit a change of the victim's email and password. An attacker who got a logged-in victim to open that page could take over the account.

Vulnerables Follow

Published on web.archive.org

Bounty$250 View original

{{media:0}}

Vulnerables, on web.archive.org

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely the profile change request was accepted without validating a per-session anti-CSRF token, so a forged cross-site form submission was treated as legitimate.

Impact

An attacker could take over a victim's account by changing its email and password, provided the victim opened the crafted page while logged in.

What the attacker needed

Victim is logged in; victim opens attacker's HTML page; attacker can host a page

The fix

The issue was fixed by the vendor, presumably by enforcing a valid anti-CSRF token on the profile change request.

How it was found

  1. Create an attacker account and a victim account, or use one account, in two different browsers.
  2. Log in to both accounts and open the account settings page.
  3. Turn on interception in a web proxy and save the profile change request.
  4. Use the proxy's PoC generator to produce an HTML form and save it as a local file.
  5. Change the email in that HTML to the attacker's address.
  6. Open the file in the victim's browser, submit it, and confirm the victim's email and password were changed.

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 write-up has not been written yet. The Original tab links to the source.

When you are logged in, your browser automatically sends your session cookie with every request to that site. A cross-site request forgery (CSRF) trick makes your browser send a change request the attacker wrote, without you meaning to. Here the site did not check a secret token, so the change went through and the attacker could set a new email and password.

What is CSRF?

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

More by Vulnerables

View all

2 more disclosed reports, best first.

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.