Broken Object Level Authorization (BOLA): The Number One API Security Risk
Why BOLA tops the OWASP API Security Top 10, how it shows up in REST and GraphQL, and how to test and fix it.
What Is Broken Object Level Authorization (BOLA)
OWASP explains the ranking in one line: APIs tend to expose endpoints that handle object identifiers, which creates a wide attack surface for object-level access control issues. Every endpoint that takes an ID needs its own authorization check, and in a large API it only takes one missing check to expose data across users or tenants.
How BOLA Works
A mobile app fetches the logged-in user's profile:
GET /v2/users/58213/profile
Authorization: Bearer <user A token>The API validates the token (authentication) but fetches user 58213 by ID without checking that the token belongs to that user (authorization). Changing the ID returns another user's profile. Because APIs return structured data and are designed to be called programmatically, an attacker can enumerate IDs at scale.
BOLA in GraphQL
GraphQL resolvers that fetch by id or global node ID have the same problem. A query such as query { order(id: "T3JkZXI6OTk=") { total shippingAddress } } must check ownership inside the resolver; checking only at the top-level query is not enough when nested fields resolve other objects.
BOLA vs Related API Authorization Flaws
| OWASP API risk | What is missing | Example |
|---|---|---|
| API1:2023 BOLA | Check that the caller may access this object | User A reads user B's order by ID |
| API3:2023 Broken Object Property Level Authorization | Check on which properties of the object the caller may read or write | A user sets "role":"admin" in a profile update (mass assignment) |
| API5:2023 Broken Function Level Authorization | Check that the caller may use this function at all | A normal user calls DELETE /admin/users/12 |
How BOLA Is Tested
- Build an endpoint inventory from the API specification (OpenAPI, GraphQL introspection where enabled), client traffic and documentation, including deprecated versions. See API9:2023 Improper Inventory Management.
- Authenticate as two users in each role and, for multi-tenant APIs, in two tenants.
- For every endpoint and method that takes an identifier, replay user A's request with user B's token.
- Test identifiers in path, query, body, headers and nested objects, including batch endpoints that accept arrays of IDs.
- Confirm with the full request and response pairs for both users.
Prevention
- Implement an authorization check that relies on the user policies and hierarchy for every function that receives an object ID from the client.
- Derive the acting user from the session or token, never from a client-supplied user ID.
- Scope data-access queries by owner or tenant.
- Prefer random, non-sequential identifiers as defense in depth.
- Write automated tests that fail when a second user can access the first user's objects, and run them in CI.
How FireCompass Tests for BOLA
FireCompass AI agents enumerate API endpoints and test object-level access with multiple authenticated identities, across REST and GraphQL, and report BOLA with paired requests and responses that prove cross-user access. See AI API penetration testing.
Sources and Standards
- OWASP API Security Top 10 2023: API1 Broken Object Level Authorization
- OWASP API Security Top 10 2023 list
- MITRE CWE-639: Authorization Bypass Through User-Controlled Key
- OWASP Authorization Cheat Sheet
Frequently Asked Questions
What does BOLA stand for?
Broken Object Level Authorization. It is API1:2023 in the OWASP API Security Top 10.
What is the difference between BOLA and IDOR?
They are the same underlying flaw. IDOR is the traditional web term; BOLA is the term OWASP uses for APIs.
What is the difference between BOLA and BFLA?
BOLA is missing authorization on a specific object. Broken Function Level Authorization (API5:2023) is missing authorization on a whole function or endpoint, such as an admin action.
Can an API gateway prevent BOLA?
Usually not on its own. Gateways enforce authentication, rate limits and coarse policies, but object ownership depends on application data, so the check normally belongs in the service or a policy engine it calls.
How do you test for BOLA?
Use at least two accounts per role, replay each object-level request from one account with the other account's credentials, and compare responses across every method.
Further Reading
- API Penetration Testing: What It Is, How It Works, and How to Do It Continuously
- API Penetration Testing in 2026: Why Scanners Miss What Attackers Exploit
Related Terms
Find the API Endpoints That Skip the Ownership Check
Run a free AI pentest against your APIs and get BOLA findings with paired cross-user requests as proof.
Free AI Pen TestNo credit card. Findings include reproducible steps and exploit code.
