Skip to content
Account takeover Disclosed report Intermediate

Login with Google Not Authenticated on iOS App

The backend endpoint for Google login accepts an ID token issued for another app's Google client. A token from another app could be used to access user accounts.

Bhavuk Jain Follow

Originally disclosed on HackerOne

  • Fixed in 7 days
  • Paid in 2 months
  • Disclosed after 4 months

In your iOS application, there is Login with Google. In this, you're not authenticating a user properly and it can lead to access to user accounts.

Affected API: https://www.instacart.com/api/v2/users/google_login_auth

In this request, these are the parameters: access_token, client_id,id_token, login_only, read_terms.

In the parameter: id_token, you're passing the token generated by Google user authentication. But the token generated is not properly authenticated at your backend. You're not authenticating if the token is generated by your app or not. For example, I logged in with the app Meetup via login with Google. The id_token generated by Google for this app, when used with your /google_login_auth API, it's still get accepted.

This means ​an app like Meetup can access the user accounts of your users using the id_token generated by Meetup. This can compromise your user's accounts.

The proper way of authenticating the user is mentioned here: https://developers.google.com/identity/sign-in/web/backend-auth#verify-the-integrity-of-the-id-token

The original report as published on HackerOne, by bhavukjain1. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the backend does not verify the token's audience (the client_id it was issued for), so it accepts tokens minted for any Google OAuth client.

Impact

An attacker could use a token from another app to access user accounts, compromising them.

What the attacker needed

A Google account; access to another app's Google login; ability to send requests to the API

The fix

The backend should verify the ID token's integrity and audience as described in Google's documentation.

How it was found

  1. Log in to a different app (Meetup) using Google sign-in.
  2. Obtain the ID token that Google issued for that app.
  3. Send that token to the target's google_login_auth endpoint.
  4. Observe that the token is accepted by the endpoint.

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 report has not been written yet. The Original tab links to the source.

When you sign in with Google, Google gives your app a special token that proves who you are. The app's server should check that the token was meant for this app, but it didn't. So a token from a different app could be used to log in as someone else.

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 Bhavuk Jain

View all

1 more disclosed report, best first.

More from Instacart

View all

The newest disclosed reports for this program.

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.