Skip to content
IDOR Write-up Intermediate

IDOR Exploit: Gaining Unauthorized Control Over Users’ Shopping

An IDOR vulnerability in a web store's shopping basket allowed an attacker to delete items from a victim's basket without consent. The attacker could also add their own products to the victim's basket as a side effect.

Mo2men Elmady Follow

Published on 0xmatrix.medium.com

بِسْ� اللَّه الرَّحْ� ن الرَّحِي� . . اللَّه� َّ صَلِّ وَسلَّ� وبارك على نَبِينَا � ُح� َّد

Mo2men Elmady, on 0xmatrix.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 server did not verify that the basketId in the request belonged to the authenticated user, allowing any value to be used.

Impact

An attacker could delete items from any user's shopping basket and, as a side effect, add their own products to the victim's basket.

What the attacker needed

A user account; knowledge of victim's basketId and itemId

How it was found

  1. Intercept the delete request for a product in the basket.
  2. Replace the attacker's basketId and itemId with the victim's basketId and itemId.
  3. Observe a 200 OK response, confirming the deletion.

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 uses a user-supplied identifier to access a resource without checking if the user is allowed to. Here, the basket ID was not tied to the user's session, so changing it let an attacker act on someone else's basket.

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.