Skip to content
Account takeover Write-up Intermediate

⚙️ 12. — Password Brute-Force via Password Change

The password change form accepted a username from a hidden POST parameter instead of the session, and returned a distinct error message when the current password was correct but the two new passwords differed. An attacker logged in as any user could brute-force another account's password by watching for that specific message.

medium.com

Published on medium.com

4. 🖱️ In Burp → Proxy → HTTP history → find POST /my-account/change-password from Test C → Send to Intruder

The4v1, on medium.com

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 password change endpoint took the target username from a hidden form field rather than the authenticated session, and its error messages differed depending on whether the current password was correct.

Impact

An authenticated attacker could brute-force another user's password and take over that account, provided the victim's password is in the candidate list and the attacker keeps the two new-password fields different to avoid lockout.

What the attacker needed

A free account on the site; victim's password in the candidate list; ability to intercept and edit requests

The fix

The endpoint should derive the username from the server-side session, return one generic error for every failure case, and apply lockout and rate limiting consistently regardless of whether the new passwords match.

How it was found

  1. Log in as the low-privileged user and open the password change page.
  2. Capture the password change request and send it to Intruder.
  3. Change the username field to the victim's username and mark the current-password value as the payload position.
  4. Set the two new-password fields to different fixed values so the account does not lock.
  5. Load the candidate password list and add a Grep Match for the 'New passwords do not match' message.
  6. Run the attack and note the payload from the single row where the Grep Match fires, then log in as the victim with it.

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 change form should only ever change the password of the person who is logged in. Here the form also carried a hidden field naming the account, and the server trusted it, so a logged-in user could ask the server to check someone else's password. The server also gave a different error when the old password was right, which let an attacker try many guesses and spot the correct one.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.