IDOR vulnerability allow attacker to make a checkout order on behalf of other users
The order-creation endpoint trusted a user-supplied user_id parameter, so an attacker could create a checkout order attributed to another user. Because user IDs were sequential, an attacker could target any known account and redirect the delivery address.
Published on medium.com
Hello, this is Omar Atallah and i would like to share and publish some vulnerabilities and security issues discovered by me on Private or public bug bounty programs.
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 order-creation endpoint accepted a client-supplied user_id and used it to set order ownership without verifying it matched the authenticated session.
Impact
An attacker could place orders attributed to other users and change the delivery address, so goods could be redirected; the report rates it as a P2.
What the attacker needed
An account on the shop; knowledge of a victim user ID; ability to intercept HTTP requests
The fix
The order endpoint should derive the owner from the authenticated session and ignore any client-supplied user_id.
How it was found
- Create two accounts, one attacker and one victim, and log in as the attacker.
- Follow the normal checkout flow and submit an order while intercepting the request.
- Add a user_id parameter to the request body set to the victim's ID.
- Send the request and observe that the order is created on the victim's behalf.
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) happens when a website lets you name the record you want, such as a user ID, and does not check that the record belongs to you. Here the order form accepted an extra user_id field, so the server created the order under whichever user the attacker named. Since IDs were simple increasing numbers, guessing other people's IDs was easy.
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.