Broken Object Level Authorization

Broken Object Level Authorization

Change one id in the URL and read a stranger's record.

What Is Broken Object Level Authorization?

Broken object level authorization, also called BOLA or IDOR, is the most common API vulnerability. The endpoint returns the object named by an identifier in the request without checking it belongs to the caller. The token is honest. You'll change a single number in a by-id URL, read a stranger's record, then walk sequential identifiers into a bulk harvest. The fix compares the record's owner against the authenticated session, and returns 404 rather than 403 so a rejected id cannot be confirmed to exist.

What You'll Learn in Broken Object Level Authorization

Broken Object Level Authorization — Training Steps

  1. An ordinary rider

    Larkway is a ride-hailing app, and it lets any rider turn on a personal Trips API to export their own ride receipts for expense reports. Bob signed up as a normal rider, with a throwaway identity, and switched it on. His account is nothing special: a plain rider seat with a token that reads his own trips. He opens the developer console to see what the API gives him.

  2. Trip ids are just numbers

    Bob's own trips are listed with their ids, and the API reference shows how to fetch any single trip receipt by its id. Two things stand out about those ids.

  3. Fetch his own trip

    First Bob calls the endpoint the way it is meant to be used: he asks for one of his own trips by its id, carrying his own rider token in an Authorization header, exactly as the app does.

  4. His trip, as expected

    The server returns exactly what it should: Bob's own trip, because the id he asked for is his.

  5. Change one number

    Bob sends the same request, carrying the same token, and changes only the id, one below his own. If the server checks that a trip belongs to the caller, this should return nothing. If it only checks that his session is valid, it will answer.

  6. Someone else's ride

    It answered. Bob's own rider token just pulled a trip that has nothing to do with him.

  7. Walk the sequence

    One stranger is a curiosity. Bob keeps decrementing the id, and every value returns a real receipt. He reaches for another one to confirm the pattern.

  8. Every rider, at scale

    The ids run in sequence, and each one answers. That turns a single leak into a harvest.

  9. Knowledge check

    You just watched a valid rider read strangers' trips by changing the id in the URL. Lock in why.

  10. The alert lands

    You own Larkway's rider-facing Trips API. Overnight, monitoring flagged one rider token pulling thousands of trips that were not its own. Security operations has emailed you the details.

Security Framework Coverage

OWASP API Top 10

  • API1:2023 Broken Object Level Authorization

CWE

  • CWE-639 Authorization Bypass Through User-Controlled Key
  • CWE-862 Missing Authorization

CIS Controls

  • CIS 16 Application Software Security

NIST CSF

  • PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
  • PR.PS Platform Security