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

This project is insecure, you can set a random jwt token and still get access to the dashboard #30

Open
ar065 opened this issue Mar 16, 2021 · 6 comments

Comments

@ar065
Copy link

ar065 commented Mar 16, 2021

No description provided.

@kosvrouvas
Copy link

Can you elaborate a bit?

@ar065
Copy link
Author

ar065 commented Mar 17, 2021

local Storage.setItem("jwtToken", <jwt token>);
I used the token from the jwt.io debugger since it was the easiest to find, after setting that value in local storage you log in automatically, and the jwt token is never checked against the database

@kosvrouvas
Copy link

woah, you are right. We need to disclose this properly. @rishipr

@Hartaj-Singh-Dev
Copy link

Hey I would like to work on it ,
can you please elaborate it more

@danielzting
Copy link

Looks like it's because client/src/App.js uses jwt_decode which explicitly does not validate the signature. It should instead pass the JWT to a server-side API endpoint that checks the token with the secret in config/keys.js. (Speaking of security, personally I wouldn't have my secrets checked into version control either...)

@Alchem1Krypt
Copy link

Yeah, the problem is that the token is not verified on the server side which makes any token work on the client side.
so there should be an HTTP endpoint that does token validation and the private pages must be reachable only if the token is valid.

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

5 participants