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

open redirect for target_link_uri parameter #672

Closed
zandbelt opened this issue Sep 2, 2021 · 3 comments
Closed

open redirect for target_link_uri parameter #672

zandbelt opened this issue Sep 2, 2021 · 3 comments

Comments

@zandbelt
Copy link
Member

zandbelt commented Sep 2, 2021

see #671, thanks @Meheni

Recently we have forged a URL for a phishing attack that redirects the user, after their authentication on our OP, to any site of our choice.

the forged url is as follows:

https://<oidc_callback>?iss=<issuer>&target_link_uri=https://FQDN_phishing\.<domain_your_oidc_callback>/

example:

https://myapplication.local/app/redirect_oidc?iss=<issuer>&target_link_uri=https://google.fr\.myapplication.local

After authentication, user is redirect to https://google.fr\.myapplication.loca

According to the OpenID Connect documentation,
https://openid.net/specs/openid-connect-core-1_0.html#ThirdPartyInitiatedLogin

"target_link_uri
OPTIONAL. URL that the RP is requested to redirect to after authentication. RPs MUST verify the value of the target_link_uri to prevent being used as an open redirector to external sites."

Does the module verify the value of the target_link_uri to prevent being used as an open redirector to external sites? and how to configure it in the module?

@Meheni
Copy link

Meheni commented Sep 2, 2021

Hi,
Thank you for your work.

Meheni

@zandbelt
Copy link
Member Author

zandbelt commented Sep 3, 2021

this fix is now included in release 2.4.9.4

@Meheni
Copy link

Meheni commented Sep 6, 2021

Hi,

I just tested the new version 2.4.9.4 and the fixed works very well.

I have the following message on my browser :

Error:

URL not allowed

Description:

value does not match the list of allowed redirect URLs: https://google.fr/.myapplication.local

Thank you again for your work.

Best regards,
Meheni

thalman pushed a commit to thalman/mod_auth_openidc that referenced this issue Oct 29, 2021
closes OpenIDC#672; thanks @Meheni
release 2.4.9.4

Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
(cherry picked from commit 03e6bfb)
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

No branches or pull requests

3 participants
@zandbelt @Meheni and others