-
Notifications
You must be signed in to change notification settings - Fork 156
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
[Bug]: Validation of redirect_uri is not performed before redirect #627
Comments
I've just tested using our example, and cannot reproduce.: go run github.com/zitadel/oidc/v3/example/server I modified the client's requested redirect URL, so the auth request looks like:
The browser prints the correct error message:
If you somehow able to pass invalid redirects, can you be more clear with:
|
@muhlemmer Thanks for the prompt response. This can be reproduced using any version of the package, including the latest main ( It can be reproduced using your example server without modifications. For example:
Will redirect to:
Many error cases such as that one do not perform any validity checks on redirect URIs. |
I see what's happening. As the client ID is incorrect, the lib can't find the client. In that case it returns a I will do some research what the correct error type should be for a non-existing client ( |
Thanks for the report BTW. |
The Oauth2 RFC 6749, section 4.1.2.1 is also pretty clear on this:
|
Any movement on this? If this was categorized as a "small issue" I believe you should reconsider. This issue means every user of your library is susceptible to what's typically around a 6.1 CVSS vulnerability. Respectfully, I don't see anything in your "Sprint Backlog" or "In Progress" columns that should be a higher priority than this for a company specializing in identity infrastructure. If you don't have the resources, let me know and I'll be happy to take a stab at a pull request. |
Hi, small issue means we don't need to plan it to fix it, because it's supposedly under a day work. We work on small issues between prioritized issues. It doesn't mean it is low priority. I already did som preliminary work, but halted for a bit because I need to rethink some of the |
Thanks for the update! I appreciate it! |
🎉 This issue has been resolved in version 3.27.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Preflight Checklist
Version
No response
Describe the problem caused by this bug
Authorization servers MUST NOT redirect the user to redirect URIs unless they are valid:
Redirect URIs are only valid if they match a pre-registered URI:
I believe the spec is clear here. However, this repo happily redirects users to any redirect URI, with no validation performed, on a variety of errors. This also has security implications.
To reproduce
Make a request like so:
The
redirect_uri
is invalid, as it is not a pre-registered value, but the client will be redirected anyway.Screenshots
No response
Expected behavior
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: