My first 10k bdt bounty from an e-commerce site
An e-commerce site's order cancellation endpoint accepted any order ID without verifying ownership, allowing an authenticated user to cancel other users' orders. The attacker could cancel arbitrary orders by changing the orderId parameter.
Md Saikat
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.
Context
This is a write-up of an IDOR (Insecure Direct Object Reference) found on a well known e-commerce site in the researcher's country. The feature involved is the checkout and order management flow. After a user proceeds with an order, the application redirects to a "Your Orders" page, and the address bar contains an order identifier as a query parameter. The same application also exposes a "cancel orders" function, which lets an authenticated user cancel their own orders through an API endpoint.
The researcher reports the issue was fixed and that a bounty of 10,000 BDT was awarded. The report was reported on Fri, May 8 and awarded on Thu, May 14.
Setup
No specific account roles, versions or tool versions are described. The researcher used Burp Suite, intercepting requests and sending them to the Repeater tab. The precondition is a normal authenticated user account on the e-commerce site, with at least one order placed so that the checkout redirect and the cancel order function can be exercised.
Finding it
While ordering a packet of fish food, the researcher noticed the URL after the checkout redirect:
https://site.com/checkout/payment?orderId=xxxxxxx

The orderId parameter in the URL is a direct reference to an order. That is what made it interesting: if the server trusts the value supplied by the client, changing it might expose or affect another user's order.
Exploitation
Step 1: Tampering with the payment page parameter
The researcher intercepted the request and sent it to Repeater, then changed the value of the parameter from:
https://site.com/checkout/payment?orderId=1111111
to:
https://site.com/checkout/payment?orderId=1111112
The response was 401 Unauthorized.

At this point the payment page itself appeared to enforce authorisation on the order, so the direct tampering did not work.
Step 2: Looking at the cancel order function
Rather than stopping, the researcher explored the "cancel orders" option. This is a legitimate function: an authenticated user can cancel his or her own orders. The researcher cancelled an order, intercepted the request, and observed the following URL:
https://site.com/api-v4/Order/CancelOrder?orderId=xxxxxxx
Step 3: Changing the order id
The request was sent to the Repeater tab and the last value of the order id was changed. The response came back with a 200 status code, which the researcher interpreted as having successfully cancelled another user's order without access to that user's account.

Step 4: Confirming the behaviour
To confirm, the researcher changed the last digit to another random integer. This time the response was 404 Not Found.

The researcher concluded that a 200 response means an order exists, while a 404 means it does not. Through the 200 response the researcher was able to cancel another user's order without access to that user's account.
A proof of concept was made and the issue was reported to the authority. It was fixed and a bounty of 10,000 BDT was awarded.
Root cause
The CancelOrder endpoint takes the orderId from the request and acts on it without verifying that the order belongs to the authenticated user making the request. The payment page (/checkout/payment) did return 401 Unauthorized when the orderId was changed, so authorisation checks existed on that path, but the cancel API did not apply an equivalent ownership check. The report does not describe the server-side code, so the exact implementation is not shown; the behaviour is consistent with the endpoint authorising the request as a logged-in user but not checking ownership of the specific order.
Impact
An authenticated attacker could cancel other users' orders by supplying their order identifiers, without access to those users' accounts. The report does not state how order identifiers are generated or how easily they could be guessed; the researcher changed the last digit of an existing identifier, which suggests sequential or predictable identifiers, but the report does not confirm this.
Fix
The report states the issue was fixed, but does not describe the change. The appropriate fix is for the CancelOrder endpoint to verify that the order identified by orderId belongs to the authenticated user before performing the cancellation, and to return an authorisation error otherwise. The same ownership check should be applied consistently across all order-related endpoints, not only the payment page.
Variants to test
- Other order actions: try the same identifier tampering on endpoints for viewing order details, invoices, refunds or returns. A positive result is a
200response containing another user's order data or performing an action on it. - Identifier patterns: test sequential or predictable identifiers on any endpoint that accepts an object id. A positive result is a valid response for an id that was not issued to your account.
- Response code differences: compare responses for existing and non-existing identifiers. A positive result is a consistent difference (for example
200versus404) that reveals whether an object exists. - Authorisation on related paths: check whether checks applied on one path (such as the payment page returning
401) are also applied on API paths that perform the same or related actions. A positive result is an API path that succeeds where the UI path refuses.
What happened, in plain words
An online shop let people buy things through a website. When you finish buying something, the shop sends you to a page that shows your order, and the web address of that page contains a number that identifies your order. Later, the shop also lets you cancel an order you placed, and that cancel action talks to a part of the shop's system that is not a normal web page but a small service behind the scenes.
The researcher who wrote this report noticed that number in the web address. They wondered what would happen if they changed it to a different number. If the shop simply trusted whatever number the browser sent, then changing the number might let one person look at, or act on, someone else's order. That kind of mistake has a name: an Insecure Direct Object Reference, or IDOR. It means the system uses a direct reference (here, an order number) to find a thing, and does not check that the person asking is allowed to touch that particular thing.
In this case, changing the number on the payment page did not work: the shop refused with an error. But the cancel-order feature did not have the same protection. By changing the order number in the cancel request, the researcher was able to cancel another person's order without having access to that person's account. The shop fixed the problem and paid a bounty of 10,000 BDT. The report was reported on Fri, May 8 and awarded on Thu, May 14.
Background ideas you need first
Before walking through the steps, here are the few ideas the whole story rests on. None of them require any special software knowledge.
- A web address with a question mark in it. When you see something like
https://site.com/page?name=value, the part after the?is extra information sent along with the request. It is called a query string, and eachname=valuepair is a parameter. Think of the address as an envelope and the parameters as sticky notes on the outside: the shop reads them to decide what to show you. - An order identifier. Shops need a way to tell one order from another. They give each order a unique label, often a number. That label is the order id. It is a direct reference: it points at exactly one order.
- An API. A normal website is built for humans to look at in a browser. An API is the same kind of service but built for programs to talk to, usually returning raw data rather than a pretty page. A useful comparison: a restaurant menu is the website (nice to read), while the order slip the waiter takes to the kitchen is the API (short, structured, meant for the kitchen, not the customer).
- Being logged in, and what proves it. When you log in, the shop gives your browser a small piece of proof, often stored as a cookie or a token. Your browser sends it back with every request so the shop knows who you are. This is authentication: proving who you are. It is not the same as authorisation: proving you are allowed to do this specific thing. You can be logged in (authenticated) and still not be allowed to cancel someone else's order (not authorised). IDOR is usually an authorisation failure, not an authentication one.
- HTTP status codes. Every response from a web server carries a three-digit number.
200means OK, the request succeeded.401 Unauthorizedmeans the server does not accept who you are for this request (despite the name, it is really about authentication).404 Not Foundmeans the thing you asked for does not exist. These numbers matter later because they tell the researcher what the server did. - Burp Suite and Repeater. Burp Suite is a tool that sits between your browser and the website so you can see and edit the requests your browser sends. Repeater is one part of it: you paste a request in, change something, send it, and read the response. It is like being able to rewrite a letter before it goes in the post box, and read the reply.
Setting the scene
The researcher was at home during quarantine and wanted to buy fish food for their fish.

They found a packet on a well known e-commerce site in their country and ordered it. The site has a checkout flow: you confirm your order, and then the site sends you to a page called "Your Orders". While on that page, the researcher looked at the address bar and saw this:
https://site.com/checkout/payment?orderId=xxxxxxx

Line by line, in plain words:
https://site.comis the shop's address./checkout/paymentis the page you land on as part of paying for or confirming an order.?orderId=xxxxxxxis the parameter.orderIdis the name, andxxxxxxxis the value, the label of this particular order.
The researcher's reaction, as they put it, was that their "evil mind" woke up. The reason is simple: the browser is sending the order number, and the shop has to decide what to do with it. If the shop checks that this order really belongs to the logged-in person, all is well. If it just trusts the number, then anyone can put any number there. That is the whole idea behind testing for IDOR: find a place where the browser names a thing directly, then try naming a different thing.
Trying the payment page first
The researcher opened Burp Suite, captured the request for that page, and sent it to Repeater so they could edit it. They changed the order number from:
https://site.com/checkout/payment?orderId=1111111
to:
https://site.com/checkout/payment?orderId=1111112
What this does: the first line is the request as it was, for the researcher's own order. The second line is the same request with the last digit bumped by one, which is a guess at a neighbouring order number. The researcher was not trying to break anything complicated; they were asking a single question: does the shop notice that this order is not mine?
The response was 401 Unauthorized.

In plain words: the payment page refused the changed order number with a 401. So this particular door was locked. Many people would stop at this point. The researcher did not, and that decision is the most useful lesson in the report: one protected page does not mean every page that touches orders is protected.
Finding the cancel order feature
The researcher kept exploring the site and found the "cancel orders" option. This is a normal, legitimate feature: a logged-in user can cancel an order they placed. The researcher cancelled one of their own orders, intercepted the request that the browser sent, and saw this address:
https://site.com/api-v4/Order/CancelOrder?orderId=xxxxxxx
Line by line:
https://site.comis still the shop./api-v4/Order/CancelOrderis an API path. Notice the wordapiin it: this is the behind-the-scenes service, not a page you would normally look at.OrderandCancelOrderdescribe what it does.v4looks like a version label.?orderId=xxxxxxxis again the order number, sent the same way as before, as a parameter in the address.
Why this matters: the cancel action is exactly the kind of thing that should be tied to the person doing it. Cancelling your own order is fine. Cancelling someone else's is not. And because this is an API, it is a separate piece of the shop's system from the payment page, which means it may have been written by different people, at a different time, with different checks. That is precisely why the researcher tried the same trick here.
Changing the order number in the cancel request
The researcher sent the cancel request to Repeater and changed the last digit of the order number. The response came back with a 200 status code.

In plain words: 200 means the server accepted the request and did the thing. The researcher had cancelled another user's order without having access to that user's account. The researcher was logged in, and the server acted on the changed order number. That is the IDOR: the order number is a direct reference, and the server acted on it without an ownership check.
Confirming what the response codes meant
One success could be a fluke, so the researcher tested again. This time they changed the last digit to another random integer. The response was 404 Not Found.

In plain words: 404 means there is no such order. So the two responses tell a consistent story. If the order number points at an order that exists, the server cancels it and says 200. If the order number points at nothing, the server says 404. That is how the researcher confirmed the behaviour was real and repeatable, not a one-off glitch.
There is a second, quieter lesson here. The report does not say how order numbers are generated or how easy they would be to guess; the researcher only changed the last digit of a number they already had, so we cannot conclude from this report alone that the numbers are sequential.
Reporting and the result
The researcher put together a proof of concept, meaning a clear, repeatable demonstration of the problem, and reported it to the shop. The shop fixed it and awarded 10,000 BDT. The report was submitted on Fri, May 8 and awarded on Thu, May 14.
The report does not describe what the fix changed. The natural fix, in plain terms, is for the cancel service to check, before cancelling, that the order named by orderId belongs to the logged-in user, and to refuse otherwise. The same ownership check should apply to every order-related action, not just the payment page that already had it.
What to take away
- Look at the address bar. Parameters like
orderIdare direct references to things. Whenever you see one, ask: what happens if I change it? - One locked door is not the whole building. The payment page returned
401, but the cancel API did not check ownership. Test every feature that touches the same kind of object. - Authentication is not authorisation. Being logged in tells the server who you are. It does not tell the server what you are allowed to touch. IDOR lives in that gap.
- Read the status codes.
200,401and404are the server telling you what it did. Comparing them across requests is how you confirm a finding. - Confirm before reporting. Change the value more than once, note what happens each time, and build a small, clear proof.
Glossary
- API: a service built for programs to talk to, rather than a page built for people to look at; it usually returns raw data.
- Authentication: proving who you are, for example by logging in.
- Authorisation: whether you are allowed to do a specific thing, once the system knows who you are.
- Bounty: a reward paid by an organisation for a valid security report.
- Burp Suite: a tool that sits between your browser and a website so you can inspect and edit requests.
- Cookie: a small piece of data a site stores in your browser, often used to remember that you are logged in.
- Enumeration: using a server's responses to work out which objects exist, for example by comparing
200and404. - HTTP status code: the three-digit number in every web response;
200means OK,401means not accepted as authorised,404means not found. - IDOR (Insecure Direct Object Reference): a flaw where a system uses a direct reference such as an order number to find something, without checking that the requester is allowed to access that particular thing.
- Order id: the unique label a shop gives to one order, used to refer to it.
- Parameter: a
name=valuepair sent with a request, often in the address after a?. - Proof of concept (POC): a clear, repeatable demonstration that a problem is real.
- Query string: the part of a web address after the
?, carrying parameters. - Repeater: the part of Burp Suite where you paste a request, edit it, send it, and read the response.
- Token: a piece of proof, similar in purpose to a cookie, that your browser sends so the site knows who you are.
- BDT: the currency in which the bounty was paid.