Example finding. Illustrative, not from a real engagement.
Any logged-in customer can read and edit other customers’ invoices
Broken access control (OWASP A01, CWE-639) · /api/invoices/{id} on app.example.com
Business impact
Changing the invoice number in a request returns another customer’s invoice, with their name, address and amounts, and lets the attacker change it. That exposes personal data and opens the door to invoice fraud.
Proof
GET /api/invoices/10482 HTTP/1.1
Host: app.example.com
Authorization: Bearer eyJ…[redacted] # customer A
HTTP/1.1 200 OK
{"id":10482,"customer":"[redacted: customer B]","total":"4,950.00"}Steps to reproduce
- Log in as customer A.
- Open one of your own invoices and note its ID.
- Change the ID to a neighbouring number.
- The server returns, and accepts changes to, customer B’s invoice.
How to fix it
On the server, check that the invoice belongs to the logged-in customer before returning or changing it. Do not rely on IDs being hard to guess.
Retest: fixed, and verified on retest.
