Skip to content
Account takeover Write-up Intermediate

Authentication bypass via sequential user IDs in Microsoft SSO integration | Critical Vulnerability

The application's backend trusted a client-supplied sequential userId to select the active account after Microsoft SSO, without checking it against the authenticated token. An attacker could change that value to log in as another user and take over their account.

irsyadsec Follow

Published on irsyadsec.medium.com

I decided to write this because I’ve bumped into the same kind of bug more than once, and it keeps surprising me that it still exists. People often think that once an application has Single Sign-On, especially with something like Microsoft, then authentication is automatically safe.

Irsyad Muhammad Fawwaz, on irsyadsec.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

The backend used a client-provided userId as the source of truth for account selection instead of binding the session to validated token claims.

Impact

An attacker could switch into another user's account, leading to immediate account takeover; the text notes that UI MFA prompts are meaningless if the backend never checks MFA claims.

What the attacker needed

Microsoft SSO login; ability to intercept and modify requests; guessable sequential user IDs

The fix

The backend should validate the token's signature and claims, bind the session to the token subject, enforce MFA claims server-side, and stop exposing sequential user IDs.

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 through a provider like Microsoft. Here, after that login, the app let the browser tell it which account to use by sending a simple number. Because the numbers were in order, someone could try other numbers and be treated as a different person.

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 irsyadsec

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.