Skip to content
Account takeover Write-up Intermediate

Exploiting Auth0 Misconfigurations: A Case Study on Account Linki

The application allowed users to create multiple accounts with the same email address through different authentication methods, and due to a misconfiguration in Auth0, these accounts were incorrectly linked. An attacker could exploit this to access the original account's data by registering with the same email using email and password.

Hossam Ahmed Follow

Published on medium.com

In the realm of application security, authentication mechanisms play a pivotal role in safeguarding user data. Leveraging robust authentication services like Auth0 can significantly enhance security.

Hossam Ahmed, 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 developers did not properly configure Auth0's account linking, allowing multiple accounts with the same email to be automatically linked without verification.

Impact

An attacker could access the original account's data by creating a second account with the same email, potentially leading to account takeover.

What the attacker needed

Victim has an account via Google; attacker knows victim's email; attacker can access Auth0 signup endpoint

The fix

The developers should properly configure Auth0's account linking extension to prevent unintended linking of accounts with the same email.

How it was found

  1. Create an account using the 'Signup with Google' option.
  2. Attempt to register with the same email and a password via the Auth0 signup endpoint, but the dbconnection parameter was incorrect.
  3. Identify the correct dbconnection name and craft a POST request to the signup endpoint with the correct client_id and connection.
  4. Submit the request to create a second account with the same email.
  5. Manipulate the authorization endpoint URL to force login with email and password.
  6. Log in with the email and password, which redirects to the original Google account, confirming the accounts are linked.

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 Google, the app uses Auth0 to handle logins. The app was set up so that if someone later signed up with the same email but using a password, Auth0 would link both accounts together. This meant an attacker could create a new login for someone else's email and then see that person's data.

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.