Chained Bugs [ Account TakeOver ]
An IDOR let the author change profile fields, including the secondary email and username, but not the primary login email. By setting the username to an XSS payload through the IDOR, the stored script ran for the victim and sent their authentication token to the author's server, leading to account takeover.
Published on medium.com
{{media:0}}
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 update endpoint did not check that the record belonged to the caller, and the username value was rendered without sanitisation on a page showing profile points.
Impact
An attacker could take over another user's account by stealing their authentication token, though the text does not show whether the secondary email alone would have allowed login.
What the attacker needed
Ability to edit another user's profile (IDOR); victim views the profile points page
How it was found
- Find a profile update request that accepts another user's identifier and change profile data.
- Notice the secondary email field can be edited but the primary login email cannot.
- Find an endpoint showing latest profile points where the username is reflected unsanitised.
- Set the username to a script payload through the IDOR.
- Have the payload send the victim's authentication token to a server you control.
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.
An IDOR is when a site lets you change someone else's record just by supplying their identifier, without checking you own it. Here the author could edit another user's profile fields, and one of those fields (the username) was later shown on a page without being cleaned up, so a script hidden in it ran in the victim's browser. That script stole the victim's login token, which is enough to act as them.
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.