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

Security Vulnerability Report: Open Redirect in Login #116

Closed
Cainor opened this issue Nov 18, 2023 · 1 comment
Closed

Security Vulnerability Report: Open Redirect in Login #116

Cainor opened this issue Nov 18, 2023 · 1 comment

Comments

@Cainor
Copy link

Cainor commented Nov 18, 2023

السلام عليكم ورحمة الله وبركاته

Dear Team,

Thank you for your contribution to the open source community.
While doing some source code review on Kuiper, I was able to find an Open Redirect vulnerability in next parameter that is used in the login process.

Open Redirect Description and Impact:
An Open Redirect issue occurs when a web application redirects users to external URLs without proper validation. This can lead to phishing attacks, where users are tricked into visiting malicious sites, potentially leading to information theft and reputational damage to the website used for redirection.

Vulnerable Code:

else:
session['user_id'] = request.form['user']
session['last_visit'] = datetime.now()
url = request.args.get('url' , None)
if url is None:
return redirect(url_for('home'))
else:
return redirect(url)

As you can see, the next parameter is not validated to be part of the site.

Recommended Solution:
Validate the user input before redirecting them.
I wish I had some knowledge in Flask just to contribute to your great repo. Here is a recommended solution I found:
https://pythonkitchen.com/how-prevent-open-redirect-vulnerab-flask/

Hope this helps.
Good luck :)

@salehmuhaysin
Copy link
Collaborator

thank you Cainor,
i think there are a lot of vulnerabilities in Kuiper, specially since it uses python 2.7 with all of its libraries.
it is intended to be used for internal team not public, so i did not do much for the vulnerabilities as long as it help the analyst to do their job. :)

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

2 participants