Skip to content
IDOR Write-up Beginner

How I Found My First Bug

The inventory API endpoint accepted a warehouse location ID without verifying that the authenticated user owned that location. An attacker could increment the sequential integer ID to access other tenants' inventory data, including stock quantities and sensitive cost metrics.

medium.com

Published on medium.com

It was past midnight. My room was dark except for the glow of Burp Suite on one monitor and a half-finished cup of tea on the other side of the desk.

Arun1x, 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

The server performed authorization checks on product variant IDs but failed to verify ownership of the location ID, which was used directly in a database query.

Impact

An attacker with a valid account could enumerate all warehouse location IDs to access every tenant's inventory data, including stock quantities, asset valuations, and Moving Average Cost, which reveals supplier pricing and margin strategy.

What the attacker needed

A valid account on the platform; ability to intercept and modify HTTP requests

The fix

The server should return a 403 Forbidden when the supplied locationId does not belong to the authenticated tenant.

How it was found

  1. Authenticate to the platform and obtain a valid session token.
  2. Navigate to the inventory section and intercept traffic in Burp Suite.
  3. Identify the POST request to the inventory endpoint containing variantIds and locationId.
  4. Send the request to Repeater. Note the response returns your own warehouse data.
  5. Increment the locationId value by one and resend.
  6. Observe the 200 OK response containing another tenant's warehouse name, stock quantities, asset valuation, and Moving Average Cost.

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.

When you use a website, the server often receives an ID number to know which item to show you. A secure server checks that the item belongs to you before showing it. Here, the server checked some IDs but forgot to check the warehouse ID, so changing that number let the user see other companies' private inventory data.

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.