Skip to content
Hands-on lab

BOLA / IDOR Hunt Lab

You are the pentester. The target is a fictional multi-tenant invoicing API with 9 candidate endpoints, and the seed decides which are really missing an authorisation check. Use the two-tenant method: collect an ID as one tenant and replay it as the other, and call admin functions with a member token. File each finding with the request that proves it, as API1:2023 Broken Object Level Authorization or API5:2023 Broken Function Level Authorization, and clear the endpoints that held. A false positive costs points.

0sPro · 5 flaws

Engagement brief

Larkspur Invoicing API

Larkspur sells invoicing to small companies. Each customer company is a tenant, and every tenant must only ever see its own invoices, files, exports and people. You have test accounts in two tenants and one admin. Find where the API hands one tenant another tenant's objects (BOLA, OWASP API1:2023) and where a member can run an admin function (BFLA, API5:2023).

  • · This build has 5 real flaws. The other endpoints are meant to hold.
  • · Score: true positives, evidence that proves each one, the right impact. False positives cost points.
  • · Everything is simulated in your browser. Nothing is sent anywhere; the company, people and host are fictional.
Same seed and level, same API and IDs: share it to compare reports.

Test accounts

A · Alice: Alice Moreno

Corvid Bakery Ltd (t_1001) · usr_1101 · member

B · Bruno: Bruno Okafor

Corvid Bakery Ltd (t_1001) · usr_1102 · member

C · Chen: Chen Wei

Halden Freight Co (t_2002) · usr_2201 · member

Admin · Priya: Priya Raman

Corvid Bakery Ltd (t_1001) · usr_1103 · admin

API reference

https://api.larkspur.example · Authorization: Bearer <token>

Core

  • GET /v1/healthLiveness check. Public.
  • GET /v1/meThe caller's own profile, from the token.
  • POST /v1/graphqlGraphQL endpoint used by the web app. Supports invoice(id) and invoices(ids: [...]).

Invoices

  • GET /v1/invoicesList invoices in your tenant. Optional ?status= filter.
  • GET /v1/invoices/{id}Fetch one invoice, including its share link token.
  • PUT /v1/invoices/{id}Update an invoice status (draft, sent, paid, void).
  • DELETE /v1/invoices/{id}Delete an invoice. Admins only.admin
  • GET /v1/share/{token}Public invoice preview behind a share link. No login needed.
  • GET /v1/payments/{id}Payment receipt for a paid invoice.

Files and exports

  • GET /v1/attachments/{id}Download an invoice attachment by its UUID.
  • GET /v1/exportsList export jobs in your tenant.
  • POST /v1/exportsStart a CSV export job. Returns the job ID.
  • GET /v1/exports/{id}Fetch an export job and its CSV.

People

  • GET /v1/vendorsShared supplier directory, visible to every tenant on the platform.
  • GET /v1/users/{id}A colleague's profile: name, title, email.

Admin

  • PATCH /v1/users/{id}/roleChange a user's role. Admins only.admin
  • GET /v1/admin/audit-logTenant audit log. Admins only.admin
  • GET /v1/admin/settingsTenant security settings. Admins only.admin
  • DELETE /v1/admin/users/{id}Deactivate a user. Admins only.admin

Noor

Lead tester · on the engagement with you

Morning. Scope is api.larkspur.example and nothing else. Test accounts are loaded: Alice and Bruno in tenant 1, Chen in tenant 2, Priya as tenant 1 admin.

Method for object-level bugs: get an ID as one tenant, replay it as the other. For function-level bugs: call admin functions with a member token.

Intel says 5 real authorisation flaws are in this build. Everything else is meant to hold, and clearing a decoy with a refused request is worth points too.

Pro run: I will give you methodology, not answers.

Loading…

Sample report · illustrative data

Sample result: BOLA / IDOR Hunt Lab debrief

Example findings from a run against the fictional Larkspur Invoicing API: each real flaw is filed with the request that proves it, then explained with its root cause and fix.

Findings filed

EndpointTypeWhat the proof showed
GET /v1/invoices/{id}BOLA (API1:2023)Any tenant can read any invoice
PUT /v1/invoices/{id}BOLA (API1:2023)Any tenant can change any invoice's status
GET /v1/admin/audit-logBFLA (API5:2023)Members can read the tenant audit log

Root cause and fix for the first finding

  • The handler loads the invoice by primary key alone (SELECT … WHERE id = ?) and returns it. Authentication happened, so the request "looked" authorised, but nothing compared the invoice's tenant with the caller's tenant. Sequential IDs made it trivial to find, but the bug is the missing check, not the ID format.
  • Scope the query itself: WHERE id = ? AND tenant_id = :tenantFromToken. A row from another tenant then does not exist for this caller, and the API returns 404.
  • Put the tenant filter in the data-access layer (a repository or ORM scope applied to every query), so a new endpoint cannot forget it.
  • Answer 404, not 403, for objects in another tenant, so the API does not confirm which IDs exist.

How scoring works

Each real flaw is worth points when you file it with the right type, the request that proves it and the right impact. A false positive costs points, and endpoints that held, filed as none with a refused request, earn a little credit for up to three decoys.

Made-up example data. Your own run uses your inputs. Downloads of the full report need Pro.

TL;DR

What this lab is

5 points
  • A browser-based pentest of a fictional multi-tenant invoicing API: 9 candidate endpoints, and the seed decides which ones are really broken (3 flaws on Rookie, 5 on Pro, 7 on Elite).
  • Two flaw types: API1:2023 Broken Object Level Authorization (a caller reaches another tenant's object) and API5:2023 Broken Function Level Authorization (a member runs an admin function).
  • You work the two-tenant method: collect an ID as one tenant, replay it as the other, and call admin functions with a member token. Then you file each finding with the request that proves it.
  • A false positive costs points, and so does a finding without proof. Endpoints that held are worth filing as "none" with a refused request.
  • The debrief gives the root cause, the fix and the detection idea for every flaw. Everything is simulated in your browser: nothing is sent anywhere, and every company, person and token is invented.

Frequently asked questions

What is the BOLA / IDOR Hunt Lab?

A hands-on lab where you act as a pentester against a simulated invoicing API with two customer tenants. You send requests as different users, work out which of the 9 candidate endpoints are really missing an authorisation check, file each finding with its proof, and read a debrief that explains the root cause and the fix.

What do BOLA and BFLA mean?

API1:2023 Broken Object Level Authorization means the API returns or changes an object without checking that the caller may access that object. API5:2023 Broken Function Level Authorization means a function meant for a higher role, such as an admin action, can be called by a lower one. IDOR is the older name for the object-level case.

How do I find these flaws?

Use two tenants. Get an object ID as a user in one tenant, then ask for that ID as a user in the other: a 200 instead of a 404 proves the object-level flaw. For function-level flaws, call admin endpoints with a member token. Test every verb on the same ID, because reads are often checked and writes forgotten.

How is the report scored?

Each real flaw earns points when you file it with the right type, an evidence request that actually proves it, and the right impact. A false positive costs 3 points, and up to three correctly cleared decoys earn credit. You pass at 70%.

What are the fixes?

Scope every lookup by the tenant in the verified token, inside the data layer, so a row from another tenant simply does not exist for the caller. Use one central policy for function-level checks, take the tenant from the token and never the request, and treat random IDs as a speed bump, not access control. Test every endpoint and verb with two tenants and two roles in CI.

Is it free?

A free account gets 3 runs in total, shared across every PlayCISO tool and lab, and the BOLA / IDOR Hunt Lab is one of them. After that it needs Pro, $5/month or $40/year. Downloads and exports are Pro.

More tools like this

Related tools and labs, with new picks every day.

All tools