Skip to content
OAuth / SSO Write-up Intermediate

An often overlooked Oauth misconfiguration.

The OAuth login flow used an intermediate endpoint without a CSRF token, relying only on the OAuth state parameter. An attacker could force a victim to link the attacker's social media account, potentially leading to account hijacking if the social network does not protect against CSRF login.

VipItHunter Follow

Published on dragon-sec.medium.com

Today I will not tell you about typical vulnerabilities in oauth: there is no csrf check, you can change the redirecturi, and so on. You can easily find all this on the Internet, because many articles have been written about this.

VipItHunter, on dragon-sec.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

This could lead to account hijacking if the social network does not pay for CSRF login, as the victim's account becomes linked to the attacker's social account.

What the attacker needed

Victim logs in to attacker's social account; attacker can load iframe on victim's side; social network does not pay for CSRF login

The fix

The OAuth flow should include a CSRF token on the intermediate endpoint to prevent forced linking.

How it was found

  1. The victim logs in under the attacker's ok.ru account.
  2. The attacker loads the intermediate OAuth link into an iframe on the victim's side.
  3. The victim is linked to the attacker's ok.ru account.
  4. The attacker enters the vulnerable site through ok.ru.

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.

OAuth is a way to log in using another service, like a social network. This report shows that a website's login step lacked a security check (a CSRF token), so an attacker could trick a logged-in user into linking the attacker's social account. That could let the attacker access the victim's account on the website.

What is OAuth / SSO?

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.