Skip to content
Account takeover Write-up Intermediate

Zero-click account takeover worth 1500€

The email change endpoint trusted the email address supplied in a cookie rather than the authenticated user's identity, so an attacker could change the email of any account by swapping the cookie value. The attacker could then take over the victim's account by requesting a password reset to the newly set email.

medium.com

Published on medium.com

Hello Everyone, This is the method and steps I followed to uncover a vulnerability that resulted in getting me a bounty of 1500 Euros.

Sakshi Rathore, 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

Impact

An attacker could take over any user's account by changing their email and then resetting the password.

What the attacker needed

Two attacker-controlled email accounts; victim's email address known; ability to intercept and modify requests

The fix

The server should identify the account from the authenticated session and ignore any email value supplied in cookies; the report says the issue was fixed.

How it was found

  1. Initiate an email change request from the attacker's account to a second attacker-controlled email.
  2. Capture the request and change the email value in the cookie from the attacker's email to the victim's email.
  3. Approve the email change link received at the second attacker email, which changes the victim's account email.
  4. Request a password reset for the victim account, receive the link at the attacker email, and set a new 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 write-up has not been written yet. The Original tab links to the source.

When you ask a website to change your email, it should check who you are from your login session. Here, the site instead read your email address from a cookie, which is a small piece of data your browser sends. By editing that cookie, an attacker could make the site think they were someone else and change that person's email, then reset the password.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.