Illustrative finding · High severity
One account can read another account's invoice
- Affected flow and impact
- An invoice endpoint checks that a user is logged in but does not check who owns the invoice. A second user can read private billing data by changing the invoice ID.
- Reproduction
- In an authorized test environment, create accounts A and B. Create an invoice as A, then request its endpoint while signed in as B. The vulnerable response returns A's invoice.
- Recommended fix
- Scope the database query to the authenticated account or tenant on the server. Apply the same ownership checks to read, update, download, and delete routes.
- Verification
- Confirm B cannot access A's invoice, logged-out requests are rejected, and A can still read it. Add a regression check for cross-account access.