Kushal997-das / Project-Guidance

:octocat:🌟 The Ultimate resources for beginner to advanced level projects all in one place πŸ’» πŸŽ―πŸš€
https://project-guidance.netlify.app/
MIT License
528 stars 413 forks source link

Recommendation to remove a default secret key #1331

Closed FHantke closed 1 month ago

FHantke commented 1 month ago

Hello,

We are a cybersecurity research group from the CISPA Helmholtz Center for Information Security and Ca’ Foscari University of Venice. We recently conducted an analysis of the session management used in your web application as part of our research. We have discovered a security flaw that we would recommend you to address in your development guidance so that other developer do not follow the same flaw.

Description:

After our analysis, we have identified that your application is using a hard-coded secret key that is leaked through GitHub. If operators who install your web application do not change this secret key, they are vulnerable to cookie forgeries. The cookie forgery attack allows an attacker, knowing the key used to sign a cookie, to forge new arbitrary cookies to impersonate and take over other accounts.

link to the relevant code part

Recommendation for Mitigation:

To address this issue and enhance the security posture of your web application, we highly recommend setting the secret key from an environment variable. If the environment file is not shared on GitHub then this would force operators of your application to create their own key upon installation, forcing them to set their own secure secret key.

We hope this notification helps improve your security and would appreciate if you could take a look into the relevant code parts and comment on the issue. Thank you!

github-actions[bot] commented 1 month ago

@FHantke

It's great having you contribute to this project

Thanks for opening this Issue πŸ™Œ , Welcome to Project Guidance πŸ’– We will review everything and get back to you.
Make sure to give a star to this repo before making a fork! Thank you :)