ATO Admin Account via Broken Password Reset Flow
The password reset flow leaked the generated verification code in a response header, and the reset only required a username. An attacker could request a reset for the admin username, read the leaked code, and take over the admin account.
medium.com
Published on medium.com
Hi everyone! I’m Qais.
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 application included the generated verification code in an HTTP response header and allowed password reset initiation using only a username, so the secret was exposed to the requester.
Impact
An attacker could take over the admin account and access the Admin Panel.
What the attacker needed
Access to the subdomain; knowledge of the admin username; a temporary email address
The fix
The application should not include verification codes in response headers or cookies, and password reset should require proof of email ownership before revealing or accepting a code.
How it was found
- Register on the subdomain using a temporary email address as the work email.
- Notice that the verification code is leaked through a web cookie.
- Request a password reset using the username 'admin'.
- Observe that the admin code is leaked in the header response.
- Get automatically redirected to the Admin Panel.
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 forget a password, a site sends a secret code to your email so only you can reset it. Here the site also put that secret code into a response header, which is a small piece of data the server sends back to the browser. Because the reset form only asked for a username, anyone who knew the admin username could ask for a reset and read the secret code without access to the admin email.
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.