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 open redirect starting with a slash and backslash #453

Merged

Conversation

oss-aimoto
Copy link
Contributor

Fix open redirect to the following cases.

http://rp.example.co.jp/oidc/redirect_uri?logout=/\phishing-site.example.com/logout.html

When the response HTTP header is 'Location: /\phishingsite.example.com/logout.html', the browser redirects to 'phishing-site.example.com'

@abartlet
Copy link

abartlet commented Nov 12, 2019 via email

@zandbelt zandbelt merged commit 02431c0 into OpenIDC:master Nov 12, 2019
@oss-aimoto
Copy link
Contributor Author

Would it not be even better to just have a server-side configured
whitelist rather than trying to enumerate badness and ban it?

I feel the same way.

There are other problems with checking the Redirect URL.
X-forwarded-Host is used to check the hostname.
If a header is injected, it can be redirected to an arbitrary URL.
It should only be accepted from trusted hosts such as mod_remote_ip.

Is this a new issue better?

@zandbelt
Copy link
Member

a new feature request issue is best for tracking support for whitelisted logout URLs

@abartlet
Copy link

abartlet commented Dec 2, 2019

This patch was created in response to CVE-2019-3877 in mod_auth_mellon, so shouldn't there be a CVE issued?

Red Hat is quite responsive issues CVEs. Just mail secalert@redhat.com.

@abartlet
Copy link

abartlet commented Dec 2, 2019

a new feature request issue is best for tracking support for whitelisted logout URLs

Where are those tracked? Just as mails on the mailing list? The issue tracker seems to have been closed.

@ret2libc
Copy link

So, this is a different flaw than CVE-2019-14857, isn't it? Anybody has anything against me requesting a new CVE to MITRE? (MITRE is slightly preferred than Red Hat in this case, to avoid possible duplicates).

@zandbelt
Copy link
Member

sure, go ahead

@ret2libc
Copy link

CVE-2019-20479 has been assigned to this issue.

zandbelt added a commit that referenced this pull request Jun 10, 2020
add new OIDCRedirectURLsAllowed primitive to handle post logout and
refresh-return-to validation; addresses #453; closes #466

Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
@zandbelt
Copy link
Member

the whitelisting of logout URLs is now in release 2.4.3, https://github.com/zmartzone/mod_auth_openidc/blob/v2.4.3/auth_openidc.conf#L837-L844

thalman pushed a commit to thalman/mod_auth_openidc that referenced this pull request Oct 27, 2021
add new OIDCRedirectURLsAllowed primitive to handle post logout and
refresh-return-to validation; addresses OpenIDC#453; closes OpenIDC#466

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

4 participants