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

Fix tab character open redirect #555

Closed
wants to merge 1 commit into from

Conversation

cfbender
Copy link

@cfbender cfbender commented Dec 8, 2021

Description

Fixes an open redirect vulnerability via the returnTo parameter, via checking for whitespace characters.

Chrome based browsers (in my testing) will trim off the tab character for a redirect, as defined in the URL parser spec. This leads to an open redirect through returnTo by setting it to something like /%09/google.com.

You can test this in chrome by executing the following in the console:

window.location.href = '/\x09/google.com'

Testing

Include returnTo=/%09/google.com in the login, it should fail with this change.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not main

@cfbender cfbender requested a review from a team as a code owner December 8, 2021 18:18
@vercel
Copy link

vercel bot commented Dec 8, 2021

@cfbender is attempting to deploy a commit to the Auth0 Team on Vercel.

A member of the Team first needs to authorize it.

@adamjmcgrath
Copy link
Contributor

Hi @cfbender - thanks for raising this, much appreciated!

We're working on a slightly different fix for this right now, and will raise another PR shortly

In future, we kindly ask that you use the Responsible Disclosure Program to report security issues

@cfbender
Copy link
Author

cfbender commented Dec 9, 2021

@adamjmcgrath my mistake, thank you so much for pointing me toward that! I had no idea that was a thing. I will absolutely keep that in mind for this and other projects.

Thanks for your diligent response as well!

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.

None yet

2 participants