Test Next.js Server Actions for auth bypass
When testing a Next.js app, look for Next-Action headers in the client bundle. Try replaying the corresponding server actions with no cookies or Authorization header to see if they are properly authenticated. Send a POST request with the Next-Action header and the function's arguments in the request body to test for authorization bypass. If the server responds with sensitive data or allows you to modify user accounts, it may indicate a vulnerability. For example, try sending a request like POST / HTTP/2 Host: target.com Next-Action: <action_id> Content-Type: text/plain;charset=UTF-8 Accept: text/x-component [{"password":"<new_password>","connection":"<connection>"},"<user_id>"] to test if you can set a new password for a user without being authenticated.
Follow #auth0 or #next-js for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.
Comments
No comments yet.