Test API endpoints for missing auth middleware
When testing API endpoints, look for routes that lack authentication middleware. Try sending requests to these endpoints with a valid authentication token, but without the required admin or role-based access control. If the request is successful, it may indicate a vulnerability. For example, test the POST /gamification/points endpoint with a student token to see if points can be added without admin access. Similarly, test the POST /notifications endpoint to see if notifications can be created for other users without proper authorization. To test, send a request like curl -X POST http://target.com/api/v1/gamification/points -H 'Authorization: Bearer <student_token>' -d '{"userId":"<any_uuid>","transactionType":"manual_adjustment","points":99999}' and verify if the response indicates success.
Follow #api-security, #authentication or #authorization for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.
Comments
No comments yet.