Broken Authentication in Mobile Application
The password reset flow returned the reset token to the user in the HTTP response, so anyone who knew a victim's email address could obtain the token and change that account's password. This allowed takeover of any account.
medium.com
Published on medium.com
Few months ago I had a penetration test project of a mobile application. I found an interesting vulnerability which made me capable of compromising any account in their system.
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 who knows a victim's email address could change that account's password and take it over.
What the attacker needed
Knowledge of the victim's email address; ability to intercept app traffic (e.g. proxy)
How it was found
- Set up a proxy between the mobile app and the internet to intercept requests and responses.
- Go through the password reset section and request a reset for a target email address.
- Observe that the backend response contains the reset password token.
- Use the token to complete the password reset and change the account password.
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 your password, a website usually emails you a secret link or code to prove you own the account. Here, the app also sent that secret code back in the response to the password reset request itself, so an attacker could just read it without access to the victim's email. With that code, they could set a new password and take over the account.
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.