Skip to content
CSRF Write-up Beginner

One Click Account takeover

The password change endpoint accepted requests without a CSRF token or the current password, so an attacker could submit a forged form from another site to set a new password. This allowed full account takeover if the victim visited the attacker's page while logged in.

sangpalisha Follow

Published on medium.com

Another CSRF bounty — by removing the CSRF token and current password from the request, an attacker could change any user’s password without their knowledge. This led to a full account takeover with just one click.

Isha Sangpal, on medium.com

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 server did not validate the CSRF token or require the current password when processing the password update request.

Impact

An attacker could take full control of the victim's account and change the email address to lock the victim out; the attack requires knowing the victim's email address, making it a spear-phishing scenario.

What the attacker needed

Victim is logged in; attacker knows victim's email; victim visits attacker's page

How it was found

  1. Log in to the target site and go to the change password page.
  2. Enter a new password, confirmation, and current password.
  3. Capture the request and remove the CSRF token, utf8 field, and current password.
  4. Send the modified request and observe a 302 redirect.
  5. Log in with the new password to confirm the change.
  6. Host a CSRF proof-of-concept page and open it in a browser where the victim is logged in.

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 change your password on a website, the site should check that the request really came from you and that you know your current password. Here, it did neither, so a malicious page could quietly send a password change request using your logged-in session. This is called cross-site request forgery (CSRF): another site makes your browser perform an action you did not intend.

What is CSRF?

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

More by sangpalisha

View all

3 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.