User B opened User A's invoice.
Signed in as a regular member of Beta Co, we changed the invoice number in the address bar to one belonging to Acme Ltd. The page loaded with Acme's name, amount and card ending 4421.
- 0:02Signed in as member@beta-co.test
- 0:09Changed invoice 1042 to 1017 in the address bar
- 0:14Invoice 1017 loaded with Acme Ltd's details
Proposed fix · src/api/invoices.ts
Check that the invoice belongs to the signed-in user's company before returning it. Same rule your orders page already uses. Re-tested on the private copy: passes.