Skip to content
Account takeover Write-up Intermediate

From Profile Update to Account Takeover: A Mass Assignment Story

The profile update endpoint accepted an email field in the request body without verifying the user's permission or requiring email confirmation. An attacker could change any user's email address to an existing account, causing the victim to be permanently locked out.

scriptjacker Follow

Published on scriptjacker.medium.com

Hey Hackers, I am Parth Narula. A penetration tester, bug hunter, red teamer and overall a security researcher.

Parth Narula, on scriptjacker.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 change any user's email to an existing account, causing the victim to be permanently locked out even after a password reset.

What the attacker needed

A valid user account; ability to intercept HTTP requests

How it was found

  1. Intercept the profile update request sent when saving changes on the profile page.
  2. Add an email field inside the contact object of the JSON request body.
  3. Send the modified request and observe that the response shows the new email with confirmed set to true.
  4. Refresh the profile page to confirm the email change persisted.

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 update your profile, the website sends data to a server. The server should only accept fields it expects, like your name. Here, the server also accepted an email address field that the user interface did not show, allowing an attacker to change someone else's email without proof of ownership. This is called mass assignment: the server blindly trusts all fields in the request.

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.

More by scriptjacker

View all

12 more disclosed reports, best first.

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.