☼
⌃
☰

Broken Object Level Authorisation

Table of Contents

API1:2023 on the OWASP API Security Top 10. An API endpoint accepts an object identifier from the client and returns or modifies that object without verifying the requesting user is actually authorised to access it. Functionally the same root cause as IDOR, but BOLA is the API-specific classification — it applies to any object-bearing endpoint (REST, GraphQL, RPC), not just traditional web parameters.

On the PT1 exam, classify findings against APIs as BOLA when the object is identified by a parameter in the request (path, query, or body) and use IDOR for the same pattern in traditional server-rendered web parameters. The exploitation technique is identical either way.

Related: Insecure Direct Object References OWASP API Security Top 10 API Testing Methodology Mass Assignment PT1 Vulnerability Classification Cheat Sheet Insecure Authentication Mechanism

1. Identifying Candidates

Any endpoint where an object identifier appears in the request — this is the entire attack surface for BOLA.

TEXT
# Path parameter
GET /api/v1/users/1001
GET /api/v1/orders/5523
GET /api/v1/documents/a1b2c3d4

# Query parameter
GET /api/v1/profile?user_id=1001
GET /api/v1/invoice?account=5523

# Request body
PUT /api/v1/account/update
{"user_id": 1001, "email": "new@email.com"}

# GraphQL — object ID in variables
{ "query": "query getUser($id: ID!) { user(id: $id) { email } }",
  "variables": {"id": "1001"} }

Two accounts are required for proper testing — register or obtain two low-privilege users so you can confirm cross-account access rather than just self-access.

2. Basic Testing — Horizontal Access

Authenticate as User A, capture the object ID for User A's own resource, then request the same resource using User B's identifier while still authenticated as User A.

SHELL
# Step 1 — User A's own resource (baseline, should succeed)
curl http://$IP/api/v1/orders/1001 \
  -H "Authorization: Bearer $USER_A_TOKEN"

# Step 2 — User B's resource, using User A's token
curl http://$IP/api/v1/orders/1002 \
  -H "Authorization: Bearer $USER_A_TOKEN"

# If Step 2 returns User B's data — BOLA confirmed

Sequential ID Enumeration

SHELL
for i in $(seq 1000 1020); do
  echo "ID $i:"
  curl -s http://$IP/api/v1/orders/$i \
    -H "Authorization: Bearer $USER_A_TOKEN" | python3 -m json.tool
done

Automated with ffuf

SHELL
ffuf -u "http://$IP/api/v1/orders/FUZZ" \
  -H "Authorization: Bearer $USER_A_TOKEN" \
  -w <(seq 1000 2000) \
  -mc 200 -fs <baseline_403_size>

3. Non-Sequential Identifiers

UUIDs and other non-guessable IDs are not protection against BOLA — the vulnerability is the missing authorisation check, not the predictability of the ID. Obtain a second user's object ID through legitimate means and test access:

SHELL
# Sources for a second user's object ID:
# — Register a second test account and capture its own IDs
# — Check if IDs leak in other endpoints (user lists, search results,
#   activity feeds, shared/public resources)
# — Check error messages — some leak valid IDs in 403/404 differences

# Test cross-account access with the captured UUID
curl http://$IP/api/v1/documents/a1b2c3d4-e5f6-7890 \
  -H "Authorization: Bearer $USER_A_TOKEN"

*