- Status
- New
- Confirmed
- Against the running system, over HTTP
- Where
- GET /api/invoices/{id}
- Category
- OWASP API1:2023 (BOLA) · CWE-639
- Vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
- Reproduce
- Log in as customer A. Fetch your own invoice. Change the id to an invoice that belongs to customer B. The server returns the whole invoice.
- Cause
- The endpoint checks that the user is logged in, but not that the invoice belongs to the user.
- Impact
- Every invoice can be fetched by counting through the ids: names, addresses and amounts for all customers.
- Fix
- An ownership check in the query on the server, and the same check on the other endpoints that take an id.
- Retest
- Check P-04 in the retest pack. It fails today, and passes once the check is in place.