Skip to content
Account takeover Write-up Intermediate

How Curiosity Led Me to a Critical Authentication Bypass

The login endpoint accepted a user_id parameter in place of the password, allowing authentication without the correct password. An attacker could log into any account by supplying its email address and corresponding user ID.

medium.com

Published on medium.com

Hello guys! 👋 It’s been a long time, but I’m back with another interesting bug bounty story. Around two weeks ago, I found one of the most exciting vulnerabilities of my bug hunting journey, and today I want to share how curiosity led me to a Critical Authentication Bypass.

Tanishx0h, 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 server trusted a client-supplied user_id parameter for authentication instead of verifying the password.

Impact

An attacker could authenticate into any user account by supplying the victim's email address and user ID, leading to full account takeover.

What the attacker needed

Knowledge of victim's email and user ID

How it was found

  1. Explore the application and focus on the login functionality.
  2. Try common login attacks such as SQL injection, pre-account takeover, and response manipulation.
  3. Remove the email field and observe an error.
  4. Send the email field with a null value and observe another error.
  5. Remove the password field and notice a different error message.
  6. Replace the password parameter with a user_id parameter and submit the request to log in without the correct 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.

A login form normally checks your email and password. Here, the server also accepted a hidden user ID number instead of the password, so anyone who knew or guessed that number could log in as that person without knowing their password.

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.

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.