Skip to content
IDOR Write-up Beginner

My First Valid Bug: IDOR in E-commerce Website

The guest cart API endpoint returned full cart details for any cart ID without requiring authentication. An attacker could read another user's cart contents, prices and tax by supplying that user's cart ID.

medium.com

Published on medium.com

Finally got my first valid bug after months of learning bug bounty. Not gonna lie, feels amazing after getting so many duplicates and N/A responses.

Atharv Chawan, on medium.com

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 guest cart endpoint performed no authentication or authorisation check on the supplied cart ID.

Impact

An attacker could read another user's cart contents, including items, prices and tax, without authentication.

What the attacker needed

A cart ID belonging to another user; no account needed to query the endpoint

The fix

The guest cart endpoint should verify that the requester is authorised to access the requested cart ID.

How it was found

  1. As a guest, add items to the cart and open the cart page.
  2. Observe the guest cart request in the network tab.
  3. Create an account, add items, and observe the authenticated cart request.
  4. Copy the authenticated cart ID and send it to the guest cart endpoint without authentication headers or cookies.
  5. Receive the full cart details in the response.

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 cart ID is a reference number for a shopping basket. The site had a separate endpoint for guest carts that did not check who was asking. By swapping in a logged-in user's cart ID, the researcher could see that user's basket without logging in. This is called an IDOR: the server trusts an identifier instead of checking permission.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

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.