Broken object-level authorization in the invoice API
Evidence
# Signed in as account A, requesting an invoice of account B
GET /v2/invoices/10482 HTTP/1.1
Host: api.example.com
Authorization: Bearer <account A>
HTTP/1.1 200 OK
{"id": 10482, "account": "B", "total": "…"}Business impact
Any signed-in customer could read other customers’ invoices, with names, addresses and amounts, by changing the number in the URL, and could edit their notes field.
Remediation
- Check on the server that each requested invoice belongs to the caller’s account, on every invoice endpoint.
- Add automated tests that request another account’s objects and expect a denial.
- Review endpoints with the same pattern, such as orders and payments.
StatusFixed — verified on re-check