Unveiling an Account Takeover Vulnerability in a Leading Automobile Brand
The password reset endpoint accepted a modified username and email, allowing an attacker to change another user's credentials and take over their account. The attacker could log in as the victim without knowing the original password.
Published on medium.com
Recently, I had the opportunity to participate in a private bug bounty program hosted by a prominent automobile manufacturer. While I’m unable to disclose specific details, I’m excited to share a scenario anonymously that highlights an important security vulnerability.
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 backend trusted client-supplied username and email fields during password reset without verifying they matched the authenticated user.
Impact
An attacker could take over another user's account by changing their credentials without knowing the original password.
What the attacker needed
Access to the internal server; knowledge of another user's username and email; ability to intercept and modify requests
The fix
The system should verify that the username and email in the password reset request belong to the authenticated user, and encrypt all sensitive fields.
How it was found
- Access the internal server login page and note the two sets of credentials.
- Initiate password reset testing and observe that login data is sent as JSON with email, username, previous password, and new password.
- Modify the username and email fields to swap credentials between User1 and User2.
- Send the modified request and observe a 200 OK response.
- Log out and attempt to log in as User2 using the modified credentials.
- Successfully access User2's account without the original password.
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.
A password reset form should only let you change your own password. Here, the system trusted the username and email fields sent by the browser without checking they belonged to the logged-in user. By swapping those fields, the attacker could reset someone else's password and log in as them.
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.