IDOR exposes other tenants' invoices
HIGH · 8.1SDX-2026-0142- Affected
GET /api/v2/invoices/{invoice_id}- CVSS 3.1
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N— 8.1 (High)- Impact
- The invoice endpoint authorizes on session validity but never checks that the invoice belongs to the caller's tenant. Any authenticated user can read another organisation's billing data — names, addresses, amounts — by incrementing the invoice ID.
- Steps
- Log in as a user in tenant A and open one of your invoices.
- Note the numeric
invoice_idin the request. - Replay the request with an ID belonging to tenant B.
- The API returns tenant B's full invoice — cross-tenant data exposure.
- Fix
- Enforce an ownership check on the server: confirm the requested invoice's
tenant_idmatches the authenticated user's tenant before returning it. Do not rely on IDs being hard to guess. Add an automated test that a user in tenant A gets403for a tenant B invoice.