Order endpoint returns any customer’s order when the ID changes
- Affected
- The order lookup endpoint of the demo API
- What we found
- The endpoint checks that the caller is signed in, but not that the order belongs to them. Changing the order number in the request returns another customer’s order, including their name, address and items.
- Evidence
- A request and response log showing a signed-in demo customer retrieving an order that belongs to a different demo customer. Personal data is redacted.
- Business impact
- Anyone with an account could step through order numbers and read every customer’s orders and contact details.
- How to fix it
- Check on the server that the order belongs to the signed-in customer before returning it.
- Apply the same ownership check to update and delete requests on orders.
- Add automated tests that request another customer’s order and expect an access-denied error.
- Retest
- After the fix, requests for another customer’s order return an access-denied error. Closed.

