WEB-07
Customers can open other customers’ invoices
Affected
GET /api/v1/invoices/{id}
Tested as
Customer (standard account)
Steps to reproduce
- 1.Sign in as customer A and open one of your own invoices.
- 2.In the request, change the invoice number to one that belongs to customer B.
- 3.The server returns customer B’s invoice in full.
Evidence
GET /api/v1/invoices/10482 HTTP/1.1Authorization: BearerHTTP/1.1 200 OK{ "invoice": 10482, "customer": "","email": "", "total": "" }
Impact
Any signed-in customer can read every invoice, including names, email addresses and amounts.
Remediation
Before returning a record, check on the server that it belongs to the signed-in user. Apply the same check to every endpoint that takes a record ID.
Retest
Fixed, confirmed on retest