WakeWill blog

Broken Object-Level Authorization Remains the #1 API Risk

Changing one ID in a request should never return another customer’s data. Yet it still does in many production APIs.

Cover image for: Broken Object-Level Authorization Remains the #1 API Risk

Broken object-level authorization (BOLA) happens when an API checks that a user is logged in, but not whether that user is allowed to access the specific record they asked for. It is ranked API1:2023, the number one risk in the OWASP API Security Top 10, because it is easy to exploit, widespread and easy to find.

GET /api/v1/invoices/10452   → your invoice
GET /api/v1/invoices/10453   → someone else's invoice (vulnerable)

Why it matters: A single missing check can expose every customer’s data, one ID at a time, and automated scripts can walk through millions of IDs in minutes.

Why it is so common

  • APIs expose object identifiers everywhere: in paths (/orders/123), query strings and JSON bodies.
  • Authorization logic is often scattered across many endpoints instead of being enforced in one place.
  • Mobile and single-page apps hide IDs in the front end, so developers assume users “can’t see” them. Attackers simply read the traffic.
  • Automated scanners struggle to detect BOLA, because they do not know which records belong to which user.

How to fix it

  1. Check ownership on every object access, on the server. For each request, verify that the authenticated user (or their tenant) is allowed to read or change that object.
  2. Centralise authorization. Use one policy layer or middleware rather than hand-written checks in each controller.
  3. Scope queries by user or tenant. Write data access as WHERE id = ? AND tenant_id = ?, not just WHERE id = ?.
  4. Use unpredictable IDs (UUIDs) as defence in depth, never as the actual control.
  5. Test for it automatically. Add tests that log in as user A and try to read user B’s objects, and run them in CI for every endpoint.
  6. Log and alert on one user accessing many different object IDs in a short time.

BOLA has two close relatives in the same list: API3:2023 Broken Object Property Level Authorization (a user can read or change fields they should not, such as isAdmin) and API5:2023 Broken Function Level Authorization (a normal user can call admin functions).

Key takeaways

  • Authentication is not authorization; check access to every object.
  • Enforce checks centrally, scope every query, and test cross-user access in CI.
  • Unguessable IDs help, but they are not a fix.

Updated November 2026. Prepared with AI assistance and checked against the sources listed below.

Sources

Spotted an error or have more information? Contact the editor.