https://huntr.dev/users/alromh87 has fixed the POST-based CSRF "project wide" vulnerability 🔨. alromh87 has been awarded $25 for fixing the vulnerability through the huntr bug bounty program 💵. Think you could fix a vulnerability like this?
Fix CSRF by requiring csrf token for authenticated post routes
💻 Technical Description *
CSRF Token is created during loggin and stored in session, then the token is sent and validated during authorized POST request, if correct token is not provided reuqest is denied.
🐛 Proof of Concept (PoC) *
Install the chat
Create a new user and login
Create a malicious file containing the following CSRF PoC:
https://huntr.dev/users/alromh87 has fixed the POST-based CSRF "project wide" vulnerability 🔨. alromh87 has been awarded $25 for fixing the vulnerability through the huntr bug bounty program 💵. Think you could fix a vulnerability like this?
Get involved at https://huntr.dev/
Q | A Version Affected | ALL Bug Fix | YES Original Pull Request | https://github.com/418sec/lets-chat/pull/1 Vulnerability README | https://github.com/418sec/huntr/blob/master/bounties/npm/lets-chat/1/README.md
User Comments:
📊 Metadata *
Bounty URL: https://www.huntr.dev/bounties/1-npm-lets-chat/
⚙️ Description *
Fix CSRF by requiring csrf token for authenticated post routes
💻 Technical Description *
CSRF Token is created during loggin and stored in session, then the token is sent and validated during authorized POST request, if correct token is not provided reuqest is denied.
🐛 Proof of Concept (PoC) *
Install the chat Create a new user and login Create a malicious file containing the following CSRF PoC:
Victim opens the crafted file) and it's name/display name are changed:
POC for regenerating keys:
Opening this the api key created before will be deleted and another one created (invalidates previously connected applications)
🔥 Proof of Fix (PoF) *
Request are now flagged as Unauthorized
👍 User Acceptance Testing (UAT)
Application continue working normally: