-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 😄 🎉
Cheers,
Mik
Tried csurf but it wasn't validating the token |
Any luck with csrf? |
Done 😉 Thanks I was looking for something like this |
Nice one thanks! Looks good to me - just waiting for a sheriff to check and we'll merge it 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really good fix 😄 🎉
Cheers,
Mik
Congratulations alromh87 - your fix has been selected! 🎉 Thanks for being part of the community & helping secure the world's open source code. |
📊 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: