Skip to content
Open redirect Write-up Intermediate

Appengine Cool Bug

The appengine.google.com conflogin endpoint had an open redirect and leaked authentication tokens via the Referer header when the victim was logged into multiple accounts. An attacker could steal a token and use it to authenticate to any site relying on this login flow, including a Google subdomain.

proximasec.blogspot.hk

Published on proximasec.blogspot.hk

Hello everybody. My name is Andrey Shevchenko, and for the past three years I've been involved in the world of Whitehat security research.

The author, on proximasec.blogspot.hk

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 conflogin endpoint allowed arbitrary continue URLs (open redirect) and did not strip the Referer header before redirecting, leaking auth and state tokens.

Impact

An attacker could steal a victim's authentication token and use it to log in to any site that relies on this login flow, including a Google subdomain, and could also learn which email addresses the victim is logged into.

What the attacker needed

Victim is logged into multiple Google accounts; victim clicks an attacker-crafted link; attacker has a valid auth token

The fix

The bug was fixed by stripping the Referer header before any further redirecting is done.

How it was found

  1. The attacker crafts a link to appengine.google.com/_ah/conflogin with a continue parameter pointing to the same conflogin page, which triggers the account chooser and leaks the auth token in the Referer.
  2. After the victim selects an account, they are redirected to another conflogin page with a continue parameter pointing to an attacker-controlled site and a valid auth token, causing an open redirect.
  3. The attacker captures the leaked auth token from the Referer and uses it to authenticate to any site that relies on this login flow.

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 log in to a website using your Google account, Google passes a secret token between sites to prove who you are. This report found that a Google login page could be tricked into sending that secret token to another website, and that the token could be stolen from the browser's referrer information. An attacker who stole the token could then log in as the victim on other sites that trust Google's login.

What is Open redirect?

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.

Similar reports

View all

Same bug class and techniques, clearest first.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.