How i could take over any Account on a USA Department of Defense Website due to a simple IDOR
The account update endpoint accepted a user-supplied id parameter, allowing an attacker to change another user's email address. By changing the victim's email to one the attacker controlled, the attacker could then request a password reset and take over the account.
Account Takeover IDOR Bug Bounty US Department Of Defense
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 id parameter in the account update request instead of deriving the user identity from the session, and failed to check that the authenticated user matched that id.
Impact
An attacker could take over any account by changing the victim's email and then resetting the password, without user interaction.
What the attacker needed
A free account on the target site; ability to intercept HTTP requests; knowledge of the victim's user id
The fix
The application should verify that the authenticated user matches the id being updated and require the old password for email changes; the text does not state whether it was fixed.
How it was found
- Create an account on the signup page and navigate to the account settings page.
- Capture the POST request sent when clicking the Update button.
- Register a second account to observe that the id parameter increments (e.g., from 623 to 624).
- Modify the captured request to use the victim's id and change the email to an attacker-controlled address.
- Send the request; the victim's email is changed.
- Request a password reset to the attacker-controlled email and complete 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.
An IDOR (Insecure Direct Object Reference) is when a website lets you access or change something by simply providing its identifier, without checking if you are allowed to. Here, the account update form included the user's id number, and the server trusted it. By changing that number to someone else's id, the attacker could update that person's email address, then use the 'forgot password' feature to reset the password and take over the account.
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.