Broken Object Level Authorization (BOLA)
Illustrative example. ACME Financial is an invented company and every detail below is made up. The layout is the one our reports use.
Impact
Using this flaw, Strafe retrieved the account details of a customer other than the one signed in. The exposed fields were the account holder’s name, routing number, account number, available balance and statements. The API accepted any account number, and account numbers are issued sequentially, so the exposure extends to every customer account and requires no privileges beyond an ordinary customer login.
A threat actor holding this information could attempt unauthorized debits against customer accounts or impersonate customers to the bank’s call center. Within an attack chain, this finding supports large-scale collection of customer data from a single customer account. Strafe assesses the likelihood as high and the impact as critical.
Technical details
Strafe tested with two customer accounts that had no relationship to each other, referred to as Customer A and Customer B. While authenticated as Customer B, the accounts page requested Customer B’s own account by its number, 100482. Strafe replayed the request with Customer B’s session and Customer A’s account number:
GET /api/v2/accounts/100481/details HTTP/2 Host: online.acme-financial.example Cookie: acme_session=[Customer B's session]

The API returned Customer A’s account details:
HTTP/2 200 OK
Content-Type: application/json
{"accountId":100481,"holder":"Customer A (test account)",
"type":"checking","routingNumber":"000000000",
"accountNumber":"0000100481","availableBalance":"2340.18"} 
The statement download endpoint behaved in the same way. Testing was limited to the two test accounts, and no other customer records were requested.

Remediation
- Resolve the requested account against the accounts held by the authenticated customer, on the server, within the API handler. Return 404 for any other account.
- Apply the same authorization check, from a single shared function, to every endpoint that accepts an account, statement, payee or transfer identifier.
- Log each refused request, and alert when a single customer requests multiple accounts they do not hold.
Replacing sequential account numbers with random identifiers would reduce the likelihood of exploitation but would not correct the missing authorization check.
## C1 - Broken object level authorization in account details
**Where:** GET /api/v2/accounts/{accountId}/details and /statements/*
**Severity:** Critical (CVSS 6.5) · Likelihood High · Impact Critical
### What "fixed" means
- A request for an account the caller does not hold returns 404
and no account data.
- The check runs in the API handler. A check in the page that
renders the account list does not count.
### What does not count
- Longer or random account identifiers.
### Where else this pattern may exist
Every route that takes an identifier from the client: statements,
payees, transfers, documents. Confirm each one resolves the
identifier against the caller's own accounts. Retest
Strafe repeated the request after the fix was applied. The API returned 404 for Customer A’s account, and Customer B’s own account loaded normally.

References
- OWASP API Security Top 10, API1:2023 Broken Object Level Authorization
- OWASP Authorization Cheat Sheet
- CWE-639: Authorization Bypass Through User-Controlled Key