Skip to content
OAuth / SSO Write-up Intermediate

Salt Labs exposes a new vulnerability in popular OAuth framework, used in hundreds of online services

The Expo AuthSession Redirect Proxy set a return-URL cookie from a query parameter without user approval, and its scheme check could be bypassed with mixed-case letters. An attacker could send a crafted link so that a victim's OAuth token was redirected to the attacker's domain, enabling account takeover on services such as Codecademy.

Aviad Carmel Follow

Published on salt.security

This post is the second in a series describing OAuth implementation issues that put companies at risk. We create these posts to share rich technical details, drawn from real-world use cases, to educate the broader industry on the nature of these errors, their potential impact, and how to avoid them to better protect…

Aviad Carmel, Security Researcher, on salt.security

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 proxy trusted a user-supplied returnUrl parameter, stored it in a cookie before any user approval, and its check that blocked https could be bypassed by mixing letter case.

Impact

A stolen token could allow full account takeover, and in some cases actions on the victim's behalf on Facebook, Google, Twitter and other platforms; the attack needed the victim to approve a confirmation message until Expo changed the flow.

What the attacker needed

Victim clicks an attacker link; target uses the Expo auth proxy

The fix

Expo stopped setting the return-URL cookie without end-user approval, clarified the confirmation message, and deprecated the proxy service; the text says the exploit no longer works without the victim's approval.

How it was found

  1. The attacker sends the victim a link to the Expo proxy start page with returnUrl pointing at the attacker's domain, which sets the return-URL cookie.
  2. The victim is redirected to Facebook, which redirects back to the Expo proxy with a secret token.
  3. The Expo proxy page reads the return URL from the cookie and redirects the browser there with the token in the URL fragment.
  4. The attacker replaces their own token with the victim's token in a normal login flow to take over the account.

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 click 'log in with Google' or Facebook, the site receives a secret token proving who you are. Expo ran a helper service that passed that token back to the app, but it decided where to send the token based on a value in the link, and it saved that value before asking the user to confirm. An attacker could put their own site in that value, so the victim's token went to the attacker, who could then log in as the victim.

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.

More by Aviad Carmel

View all

4 more disclosed reports, best first.

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.