Skip to content
OAuth / SSO Write-up Intermediate

Breaking “Login with Google” Without Touching Google: An OAuth redirect_uri Account Takeover…

The OAuth callback handler on huddleboard.io accepted an undocumented redirect_uri override parameter and forwarded the resulting session token to it without cross-checking against the value used in the initial authorization request. An attacker could send a crafted login link that, after the victim approved Google's consent screen, delivered the victim's session token to an attacker-controlled server, allowing full account takeover.

T4nv1 Follow

Published on medium.com

Third-party login buttons feel like solved technology. “Sign in with Google,” “Continue with GitHub” — they’re everywhere, they’re built on a well-documented standard, and most hunters assume the heavy lifting is Google’s or GitHub’s problem, not the target’s. That assumption is exactly why OAuth implementation bugs…

T4nv1, 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

Root cause

Likely the relying party's callback handler trusted a legacy, undocumented redirect_uri override parameter and failed to bind the redirect target used for token delivery to the one used in the initial authorization request, also resolving duplicate parameters to the last value.

Impact

An attacker could take over a victim's account, including dashboard and billing settings, with a single click and no warning signs, because the token was the platform's own full session credential.

What the attacker needed

Victim clicks a link; victim approves Google consent; attacker has a listener server

The fix

The redirect_uri should be strictly bound between the authorization and token-delivery stages, duplicate redirect_uri parameters should be rejected, and the legacy override parameter should be removed; the report states a permanent fix was shipped on Day 16.

How it was found

  1. Capture the OAuth login flow in a proxy and note the authorization request and the callback request.
  2. Observe that the callback handler accepts an extra redirect_uri parameter and forwards the session token to it.
  3. Craft a login URL that includes both the legitimate redirect_uri and a duplicate attacker-controlled redirect_uri.
  4. Send the link to a logged-out victim; they click and approve the normal Google consent screen.
  5. The victim's session token is sent to the attacker's listener; replay it as a cookie to access the victim's 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 'Sign in with Google', the app sends you to Google, then Google sends you back with a special one-time code. The app is supposed to check that the address it sends you back to is its own. Here, the app had a hidden setting that let an attacker change that return address, so the victim's login token ended up at the attacker's server.

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 T4nv1

View all

113 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.