Reset Password Token Leakage to Third-Party Analytics Leading to Account Takeover
A password reset token was sent to Google Analytics as part of the page URL in analytics requests. Anyone with access to that analytics data could obtain the token and reset the victim's password, leading to account takeover.
Published on medium.com
Hello everyone, I’m Mohamed Farghly, a Web & Network Penetration Tester and a part-time Bug Bounty Hunter.
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 password reset page included the token in the URL, and the analytics script sent the full page URL to Google Analytics.
Impact
Anyone with access to the third-party analytics data could obtain valid password reset tokens and reset user passwords without authorization, resulting in full account takeover.
What the attacker needed
Victim requests a password reset; attacker can access analytics data
How it was found
- Visit the target site and click 'forget password'.
- Enter a valid email to receive the reset password link.
- Turn on interception in Burp Suite and click the reset password link.
- Forward all requests, then go to the reset password page and copy the token from the URL.
- In Burp, go to HTTP history, open filter settings, paste the token in the search term field, and apply.
- Find the token exposed in a request to analytics.google.com.
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 reset a password, the site gives you a special link with a secret code (token) that proves it's you. This report found that the secret code was also sent to Google Analytics, a third-party service that tracks website usage. If someone could see that analytics data, they could use the code to reset your password and take over your 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.