#BugBounty — “How I was able to hack any user account via password reset?”

Bikash Gupta
May 23, 2018 · 2 min read

Hi Guys,

During my recent bug bounty hunt, I came across a critical and yet simple vulnerability. We, all have had the moment when we make these accounts at various websites and barely use them and when we try to login back to those websites, we had to reset password.
A similar incident happened when I was trying to login to this website let’s say www.example.com , I couldn’t remember the password and then I clicked on forget password.

So let’s hack.

So, wwww.example.com sent me the password reset email and I noticed base64 encoding in the link. I quickly checked the link in Burp suite and it was like this:

https://www.example.com/members/update-password/<base64 encoded>/<base64 encoded2>

Image for post
Image for post

I used the inbuilt burp suite decoder and decoded it.
first one was decoded to : <email address>- -<company name>
second one was decoded to : <GMT +00 DateTime>- -<company name>

Then i checked for new account verification email. After signing up I got a verification email which was like this:

https://www.example.com/members/email-verification<base64 encoded>/<base64 encoded2>

As you can see both the forget password link and verification link was just using Base64 encoding in it’s link which decodes to email address of which i was trying to reset password or verify and — and the last one was company name; the second one was decoded to the GMT timestamp when i requested to forget password or trying to register along with — and again company name.

Here comes the next step of compromising user account. By visiting Facebook page of that company, I found many emails of valid user accounts in the comments.I was going to reset the password of one of that email but remembered it won’t be ethical. Never test users account without company permission, better create another test account and test.

An attacker can get valid users email from the Facebook page comments and reset their password which will lead to account takeover of any user. Never share your email address publicly.

I reported this vulnerability to the concerned company, and they were quick to patch it. I thank the company for the small token of appreciation :)

Thanks for reading!

~ BgxDoc ( https://twitter.com/BgxDoc )

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store