Skip to content
Account takeover Write-up Intermediate

Account Takeover using SSO Logins

A multi-tenant service let an attacker create their own organisation and link a custom SSO provider (such as Okta) to it, then register a user in that provider with a victim's email address without any verification. Because the service trusted the email claim from the attacker-controlled SSO, the attacker could log in as the victim and switch into the victim's organisation, reaching its data and functionality.

Rikesh Baniya Follow

Published on rikeshbaniya.medium.com

Companies often provide various login methods for users to authenticate their accounts.

Rikesh Baniya, on rikeshbaniya.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 application trusted the email address asserted by a tenant-controlled SSO identity provider without verifying ownership of that email, so an attacker could bind a victim's address to an account they control.

Impact

The attacker could take over the victim's account and reach sensitive data and functionality in the victim's organisation; the text rates this as high or critical.

What the attacker needed

Ability to create an organisation; ability to link a custom SSO provider; victim's email address known; victim already a member of an organisation

The fix

The service should verify that the email asserted by a custom SSO provider is actually owned by the user, and should not let a tenant-controlled identity provider claim addresses that already belong to other accounts.

How it was found

  1. Create an organisation on the target site and invite the victim's email address as a member.
  2. Set up an Okta instance and link it to the attacker's organisation.
  3. In that Okta instance, create a user account using the victim's email address.
  4. Log in to the target site through that Okta account, which is treated as the victim.
  5. Switch to the victim's organisation to reach its data and functionality.

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.

Single sign-on (SSO) lets you log in to a website through another service, and the website trusts that service to say who you are. Here the website let anyone attach their own SSO service to an organisation they created, and that service never checked that the email address really belonged to the person signing up. So the attacker simply claimed the victim's email address and the website believed it.

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 by Rikesh Baniya

View all

1 more disclosed report, best first.

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.