Exploiting Response Manipulation for Account Takeover
The login flow reflected the attacker's customer ID in the response, and by changing it to the victim's customer ID the attacker could log into the victim's account. This allowed access to sensitive information such as card details, address, email, mobile number, and the ability to place orders.
Published on medium.com
I’m Shubham Darmwal, and today I’m excited to share my findings on a critical vulnerability I discovered while testing a website. This marks my first article, and I welcome your feedback to help me grow as a writer.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server trusted a client-supplied customer ID in the login response instead of binding the session to the verified phone number.
Impact
An attacker could take over a victim's account and access card details, address, email, mobile number, and place orders, though the report does not state how the victim's customer ID is obtained.
What the attacker needed
Attacker's own mobile number; ability to intercept and modify responses; knowledge of victim's customer ID
The fix
The server should bind the session to the phone number that was verified by OTP and never trust a customer ID supplied by the client.
How it was found
- Start a login using the attacker's mobile number.
- Capture the login request with Burp Suite.
- Inspect the response and note the attacker's customer ID.
- Enter the received OTP and capture that request too.
- Change the customer ID in the intercepted response to the victim's ID and forward it.
- The attacker is logged into the victim's account.
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 write-up has not been written yet. The Original tab links to the source.
When you log in with a phone number, the website sends a code and then checks it. Here, the website trusted a customer ID that came back from the user's own browser instead of checking it on the server. By swapping that ID for someone else's, the attacker could pretend to be that person and see their account.
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.