IDOR is simple right?…. Right?
A healthcare website's pet-update feature accepted a user ID in both a cookie and the request body, and the server did not properly check ownership. By sending the parameter twice (parameter pollution), an attacker could change another user's pet information.
medium.com
Published on medium.com
This is gonna be my first ever write up. So please, forgive any grammatical mistakes and point out any mistakes you find in this write up.
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 a client-supplied user ID for authorisation instead of checking the session owner, and duplicate parameters caused it to use the attacker-chosen value.
Impact
An attacker could view and change another user's pet information, though the report does not show broader account takeover.
What the attacker needed
A user account on the site; victim's numerical user ID; testing from Linux to see the cookie parameter
How it was found
- Open the profile section and use the update pet info functionality.
- Capture the update request in an intercepting proxy.
- Note the user ID in the cookie header and in the POST body.
- Change the user ID to the victim's ID in every request that carries it.
- When that fails, send the user ID parameter twice (attacker ID then victim ID) in each request.
- The attack succeeds and the victim's pet information is affected.
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 is when a website lets you change a number in a request to reach someone else's data, because it does not check that the data belongs to you. Here the user ID appeared in two places, and the server trusted it without verifying ownership. Sending the parameter twice confused the server into using the victim's ID.
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.