Any customer's invoices can be read by changing one number
- Summary
- The invoice endpoint returns a document by its ID without checking who is asking. IDs are sequential.
- Proof of concept
GET /api/v2/invoices/48213 Authorization: Bearer <token of account A> 200 OK { "customer": "account B", "total": 1840.00 }- Impact
- Anyone with a free account can download every invoice in the system: names, addresses, tax IDs and amounts.
- Recommended fix
- Check on the server that the invoice belongs to the caller, for every object type. Add a test that fails if the check is removed.