From Study Stress to Critical Account Takeover: How a Gym Break and a Little Curiosity Uncovered a…
The password reset and email change endpoints returned a 403 Forbidden status when the request was invalid, but the client-side application trusted this status code to decide whether the action succeeded. By intercepting the response and changing the status code to 200 OK, an attacker could reset the password and change the email address, leading to full account takeover.
Published on medium.com
Today had been one of those nonstop days. Between work and study, it felt like my brain had reached maximum capacity.
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 application relied on the HTTP status code from the server response to determine the outcome of sensitive actions, without server-side validation of the actual operation.
Impact
An attacker could reset the password and change the email address of an account, leading to full account takeover.
What the attacker needed
Ability to intercept and modify HTTP responses; valid account or access to reset flow
How it was found
- Go to the password reset functionality and trigger a password reset attempt.
- Use Burp Suite to intercept the response coming back from the server.
- Look at the HTTP status code in the response, which was 403 Forbidden.
- Change the 403 Forbidden status code to 200 OK and forward the modified response.
- Confirm that the password is reset successfully.
- Repeat the steps for changing the email address, changing the response status to 200 OK, to achieve full account takeover.
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 reset a password, the server sends back a status code (like 403 Forbidden) to say if it worked. Here, the app only looked at that code to decide success, so by changing it to 200 OK, the attacker tricked the app into thinking the reset worked. This let them take over the 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.