Skip to content
Account takeover Write-up Beginner

Weak Password Setting function on practo.com

A password-setting link remained valid after the password had already been set, allowing anyone who knew a user's mobile number to revisit the link and change that user's password without knowing the old one. An attacker could therefore take over any account by supplying a new password through the still-active link.

dark-haxor Follow

Published on medium.com

So I haven’t set my password when i came up with this issue (I logged in with OTP) . When Itried to login via browser i was prompted for setting password and this request was in play.

dark-haxor, on medium.com

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-setting endpoint did not check whether a password had already been created and did not require the current password, so the link stayed usable indefinitely.

Impact

An attacker who knows a victim's mobile number could change the victim's password and take over the account; the developer said it would not be fixed but the feature would be changed.

What the attacker needed

Victim's mobile number known; victim signed up via OTP without a password

The fix

The password-setting link should expire after first use and require the current password or a fresh one-time code before any change.

How it was found

  1. Log in with a one-time code so no password is set yet.
  2. Trigger the prompt to set a password and capture the request to the fill_password link.
  3. Set a password through that link.
  4. Return to the same link later and submit a different password.
  5. Observe the password changes without the old password being requested.

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 sign up with a one-time code sent to your phone, the site asks you to create a password through a special web address. That address is supposed to stop working once you have set your password. Here it kept working, so anyone who knew your phone number could open it again and choose a new password for you, locking you out.

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.

More from Practo

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.