This repository was archived by the owner on Dec 1, 2025. It is now read-only.
Security Fix for POST-based CSRF "project wide" - huntr.dev#810
Open
huntr-helper wants to merge 3 commits intosdelements:masterfrom
Open
Security Fix for POST-based CSRF "project wide" - huntr.dev#810huntr-helper wants to merge 3 commits intosdelements:masterfrom
huntr-helper wants to merge 3 commits intosdelements:masterfrom
Conversation
Fix Post based CSRF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 | 418sec#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: