You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GQL resolvers do not use the userId from the session to pull private data. Any user can pass up a valid userId and get information about that user. Examples include fetchUserDetails and fetchMyAccountSettings.
Anyone with a session can call updateUserProfile and update anyones profile.
config.yml is storing secrets in plaintext.
next and next-auth are pinned to latest, which can introduce vulnerabilities if new versions are deployed.
Permission checks in UserDetails and AccountDetails should ideally be done on the server, either in middleware or getServerSideProps.
Assigning roles based on name isn't the most secure.
REST API doesn't have an authorization header
newProfileData in updateUserProfile is not sanitized before being saved.
deleteUser should have its own mutation resolver to isolate permissions instead of using the updateUserProfile resolver. CAN_DELETE_USERS should also be checked server side.
processTransaction should do validation on the amount
userIdfrom the session to pull private data. Any user can pass up a valid userId and get information about that user. Examples includefetchUserDetailsandfetchMyAccountSettings.updateUserProfileand update anyones profile.config.ymlis storing secrets in plaintext.nextandnext-authare pinned tolatest, which can introduce vulnerabilities if new versions are deployed.UserDetailsandAccountDetailsshould ideally be done on the server, either in middleware orgetServerSideProps.newProfileDatainupdateUserProfileis not sanitized before being saved.deleteUsershould have its own mutation resolver to isolate permissions instead of using theupdateUserProfileresolver.CAN_DELETE_USERSshould also be checked server side.processTransactionshould do validation on theamount