Skip to content
Account takeover Write-up Intermediate

SAML authentication bypass leads to account takeover

The SAML response signature was only checked when a signature element was present, so removing the signature entirely let the attacker change the username in the assertion. An attacker could then log in as any other user without credentials or victim interaction.

Xt3sY Follow

Published on medium.com

During the sign-up process, I noticed that they were using Single sign-on SAML, which prompted me to investigate further.

Pushkar Bhagat, 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

Impact

An attacker could take over any account, including without any interaction from the victim, by forging a SAML assertion.

What the attacker needed

Ability to intercept and modify SAML responses; a valid account to start the SSO flow

How it was found

  1. Create an account and log in, noting the username.
  2. Intercept the SAML response in Burp Suite and decode it with SAML Raider.
  3. Create a second account and replace the username in the intercepted assertion with the second account's username.
  4. Remove the base64 signature value from the SAML response.
  5. Forward the modified request and observe that the session is authenticated as the other user.

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.

SAML is a way for a website to trust a separate login service. The login service sends a signed message saying who you are, and the website is supposed to check that signature. Here the website skipped the check when the signature was missing, so someone could edit the message to name a different user and be logged in as them.

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 Xt3sY

View all

4 more disclosed reports, 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.