Broken access control: sub-account IDOR leaks invoices
The endpoint /api/invoices/{accountId} accepted any numeric accountId for logged-in users, returning other tenants' invoice PDFs. Automated enumeration harvested all invoices in under an hour.
Remediation
Enforce server-side ownership checks on accountId; add authorization tests to CI; audit sibling endpoints for the same pattern.
CVSSv3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H