From IDOR to Admin Takeover: How I Accidentally Walked Into an ATO
An internal API endpoint exposed admin usernames and emails without authentication. The password reset flow trusted a user-supplied email parameter, allowing an attacker to send the reset link to their own email and take over the admin account.
Published on medium.com
Assalamualaikum and Hi everyone! Back again, Qais El Profesor here.
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 password reset endpoint accepted a user-controlled email parameter and sent the reset link to it without verifying that the email belonged to the specified username.
Impact
An attacker could take over the admin account, access the admin panel, modify system configurations, view sensitive user data, and potentially pivot deeper into infrastructure.
What the attacker needed
Access to the web application; knowledge of admin username from exposed API
The fix
The password reset flow should verify that the supplied email belongs to the specified username and should not trust client-supplied email parameters.
How it was found
- Find an internal API endpoint in JavaScript files that returns admin emails and usernames.
- Send a password reset request with the victim admin's username and the attacker's own email address.
- Receive the password reset email for the admin account.
- Follow the reset link, set a new password, and log in as the admin.
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 password reset form usually asks for your email and sends a link to that address. Here, the system let the person requesting the reset choose which email received the link, without checking it belonged to the account. So the attacker could ask for a reset for the admin's username but have the link sent to their own inbox, then set a new password and log in as the admin.
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.