Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VULNERABILITY - BaseStrategy.validate_email() doesn't actually check email address #900

Merged
merged 1 commit into from
Jul 17, 2016

Conversation

scottp-dpaw
Copy link
Contributor

BaseStrategy.validate_email() will check if a Code object exists, but not that the Code object's email field matches the email parameter passed to the method; indeed, the email parameter isn't used at all.

In a nutshell: if you have the social.pipeline.mail.mail_validation backend set up with SOCIAL_AUTH_PASSWORDLESS, you can gain access to any user account on the system. Log in once to get a genuine verification code, take note of the URL callback to the 'social:complete' view (e.g. /social/complete/email/?verification_code=b855c8966abf45e6aaac89af9b12f7c8&email=attacker%40gmail.com ), then hit the same URL but with a different email (e.g. /social/complete/email/?verification_code=b855c8966abf45e6aaac89af9b12f7c8&email=admin%40site.com).

@omab omab merged commit 2bcd91d into omab:master Jul 17, 2016
@omab
Copy link
Owner

omab commented Jul 17, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants