Any signed-in user can change other customers’ orders
shop.example.com
PATCH /api/orders/10482 HTTP/1.1Host: shop.example.com{"status":"cancelled"}HTTP/1.1 200 OK{"id":10482,"owner":"cust_2291","status":"cancelled"}# sent from a different customer’s session- Impact
- Order numbers are sequential and ownership is never checked, so any signed-in user can read or cancel another customer’s order by changing the number.
- Fix
- Check that the order belongs to the signed-in user on every request, and use unguessable identifiers as a second layer.