Skip to content
Access control Write-up Beginner

How I Found Internal Products Exposed via API

An API endpoint allowed unauthenticated users to list internal-only products by supplying simple filter values such as admin or dev. The same internal product IDs could then be added to a cart and taken towards checkout.

medium.com

Published on medium.com

While testing a web application during my internship, I came across an interesting API endpoint:

Dheeraj, 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 missing backend validation and authentication checks on the product filter and cart APIs, allowing internal resources to be accessed by unauthenticated users.

Impact

The exposed products were non-production test/dev items, so the impact was limited, but the same pattern could lead to serious abuse if it applied to real products.

What the attacker needed

No authentication required; knowledge of the API endpoint

The fix

The APIs should enforce authentication, validate product access on the backend, and restrict internal resources properly.

How it was found

  1. Send a request to the product endpoint with a filter parameter.
  2. Try simple filter values such as admin, dev, staff, and test.
  3. Observe that internal-only products are returned without authentication.
  4. Take a valid internal product ID from the response.
  5. Send a request to the cart endpoint replacing the normal product ID with the internal product ID.
  6. Open the cart page and proceed towards checkout.

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 API is the interface a website uses to fetch and send data. Here, a product search endpoint returned hidden internal products to anyone who asked, without requiring a login. The tester then showed those hidden products could be added to a shopping cart.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.