Check ownership before returning the invoice
A signed-in user can fetch another account’s invoice by changing the ID. Check the invoice’s account against the caller before returning its contents.
Evidence & suggested fix
Evidence. In this invented example, the handler authenticates the caller, then loads an invoice by ID without checking its account. A request as account A with account B’s invoice ID returns B’s invoice.
Remedy. Scope the lookup to the caller’s account. Add an API test that requests an invoice belonging to another account and expects access to be denied without returning invoice content.
Scope. This illustrates the finding format. It is not a result from a live review or a performance claim.