IDOR Leading To Improper Access Control
A gift shop's favourites feature identified items by a user ID and product code taken from the request, and the server did not check that the user ID belonged to the caller. By swapping in another user's ID, an attacker could add items to that person's favourites and delete items from their account.
medium.com
Published on medium.com
Hello guys , I wanted to share with an easy finding that I found on a website to give the full picture this website Is about selling gifts like mugs and photobooks and etc…..
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 favourites endpoint took the user ID from the request and acted on it without verifying it matched the authenticated session.
Impact
An attacker with an account could add items to, and delete items from, another user's favourites without their permission; the same swap on the shopping cart was blocked with a 403.
What the attacker needed
A free account; knowledge of the victim's user ID
How it was found
- Create two accounts, one treated as the victim and one as the attacker.
- Add an item to the victim's favourites and capture the request.
- Replace the attacker's user ID in the request with the victim's user ID.
- Replay the request and observe that the item is added to the victim's favourites.
- Change the request method and confirm items can be deleted from the victim's account.
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.
Many websites put an identifier such as a user number in the request so the server knows whose data to change. If the server trusts that number without checking that it matches the logged-in person, anyone can change it to someone else's number and act on their data. This is called an IDOR, short for Insecure Direct Object Reference.
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.