Skip to content
Account takeover Write-up Intermediate

The Frontend Hid It, The API Didn’t

The profile update API accepted an email address parameter even though the frontend offered no way to change email, and it applied the change without verifying the new address. An attacker with an active session could set their own email, trigger a password reset to it, and take over the account.

medium.com

Published on medium.com

A few years back, after a super hectic week in the office, I was just chilling on a weekend My plan was simple get some rest, watch a few videos, and do absolutely nothing security related for a day :)

Vineet Singh, 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

The email change feature was removed from the interface but the server-side endpoint still accepted and applied an email update without verifying the new address.

Impact

The issue required an active session, but once one was obtained it could turn a temporary compromise into persistent account takeover by redirecting password resets to the attacker.

What the attacker needed

An active victim session; ability to intercept requests

The fix

The server should reject email changes on the profile endpoint, or require verification of the new address before applying it.

How it was found

  1. Log in and open the My Account section.
  2. Intercept the profile update request and send it to Repeater.
  3. Add an email parameter with an attacker-controlled address and submit it.
  4. Log out and request a password reset using that address.
  5. Receive the reset email and swap the domain in the link for the working subdomain.
  6. Set a new password and log in to the account.

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.

A website has two parts: the pages you see and the server behind them that stores your data. Here the visible page had no box for changing your email, but the server still accepted a request that changed it. Because the server never checked the new address, someone holding a stolen login could redirect the password reset to their own inbox and lock the real owner out.

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.