You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 29, 2019. It is now read-only.
Hey, I was playing around with this library, and I noticed that I could get a token issued under one client id, and validate it with another. It's possible I'm missing something, but I think this may be vulnerable to a confused deputy problem.
I'm pretty sure that's incorrect behaviour. From Google's docs, it says:
Important: Before using the token, you need to verify that this field's value exactly matches your Client ID in the Google API Console. This verification ensures that your application is not vulnerable to the confused deputy problem.
I'm pretty sure that's not happening.
The text was updated successfully, but these errors were encountered:
I noticed looking at the code that this uses userinfo and not tokeninfo, so it might be that this library isn't designed to validate the token, just to use it. Let me know if that's the case. :)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey, I was playing around with this library, and I noticed that I could get a token issued under one client id, and validate it with another. It's possible I'm missing something, but I think this may be vulnerable to a confused deputy problem.
For example, I can take my oauth app from Google:
Generate a token with it using this link, in a browser (I'm doing this from Ember, which doesn't matter):
Which gives me the token:
If I use tokeninfo, it validates to that app id:
{
"azp": "926872579832-ruurs5s2cirehpavk7141n2tqqjj5el5.apps.googleusercontent.com",
"aud": "926872579832-ruurs5s2cirehpavk7141n2tqqjj5el5.apps.googleusercontent.com",
"sub": "",
"scope": "https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/plus.me",
"exp": "1508539316",
"expires_in": "3522",
"email": "[email protected]",
"email_verified": "true",
"access_type": "online"
}
But when I validate it in passport-google-token configured as such (note that clientID is different, as is clientSecret):
It successfully validates the token (I'm censoring some fields):
I'm pretty sure that's incorrect behaviour. From Google's docs, it says:
I'm pretty sure that's not happening.
The text was updated successfully, but these errors were encountered: