I Got the Admin Password by Changing One Word in a URL — This B
The account page used a URL parameter to select which user's account to load without checking ownership, so changing the identifier to the administrator's username returned the admin account page. That page pre-filled the current password in the HTML source, letting an attacker read the administrator password and log in as admin.
Published on medium.com
If you have been following my Access Control series you know I have been going through PortSwigger Web Academy labs one by one and breaking each vulnerability down so beginners can understand exactly what is happening and why it matters in real bug bounty hunting.
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 user-supplied identifier to choose the account page and also embedded the account's current password in the HTML, without verifying ownership or omitting the secret.
Impact
An attacker could read the administrator password and take over the administrator account, gaining full control of the application.
What the attacker needed
A free account on the site; knowledge of the admin username
The fix
The account page should verify that the requested account belongs to the logged-in user and should not include the current password in the HTML.
How it was found
- Log in with the provided lab credentials and open your account page.
- Send the account page request to Burp Repeater.
- Change the id parameter from your username to administrator and send the request.
- Read the raw HTML response and find the pre-filled password value.
- Log in as administrator using the found password.
- Open the admin panel and delete carlos.
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 website used a value in the web address to decide whose account page to show, but never checked that the person asking owned that account. By swapping their own username for the administrator's, the author got the admin's account page. That page included the admin's current password in the page's hidden code, so the author could log in as the administrator.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.