What Is BOLA (IDOR) Vulnerability?
- Focus
- BOLA
- Risk
- High
- Stack
- Supabase/Next.js
- Detection
- Ubserve Runtime Simulation

BOLA, also called IDOR, is an authorization flaw that exposes records outside the requester's scope — the most common launch blocker in AI-generated APIs.
BOLA happens when changing an object ID grants access to data or actions outside the authenticated actor's scope.
Secure your vibe-coded app with Ubserve
- ✓Takes less than 60 seconds
- ✓100+ security checks run through your app
- ✓Plain English explanations for each issue
- ✓AI fix prompts for every issue
BOLA, also called IDOR, is an authorization flaw that exposes records outside the requester's scope. It lets attackers reach another user's object by changing an identifier — no exploit tooling required, just a different UUID in the same request.
The vulnerability is rarely caused by missing login checks. It usually appears when code validates "who are you?" but skips "do you own this object?" on read or write paths. AI-generated APIs often miss this second check, because it's the one that only fails once a second tenant's data actually exists.
A non-technical analogy: being allowed into an apartment building does not mean you can open every unit door by changing the unit number on the intercom request.
Start free scan | See sample audit
Where BOLA Hides in a Typical Stack
- REST/API routes —
GET /api/orders/:idthat looks up by ID alone, with noWHERE tenant_id = session.tenantIdclause. - Next.js Server Actions — mutations that accept a
projectIdfrom form data and trust it without binding to the caller's session. See Next.js Server Action security for the full pattern. - Supabase queries run from the client — if Row Level Security isn't enabled, every
select()call is effectively a BOLA vulnerability at the database layer, regardless of what the frontend code does. - File and asset URLs — sequential or guessable storage paths (
/invoices/1043.pdf) that don't check the requester against the invoice owner.
BOLA is the most common single manifestation of broken access control — the umbrella OWASP category it belongs to. Fixing it structurally usually means moving from role-only checks to the object-level enforcement described in RBAC vs ABAC vs FGAC.
Agentic Risk (Cursor, v0, Bolt)
Ubserve Internal Audit data from 2026 shows 27.9% of AI-generated mutation routes enforce session presence but miss actor-to-object checks. This is the highest-frequency launch blocker in founder-shipped APIs.
Wrong vs. Right
// WRONG: object fetch by ID only
const order = await db.order.findUnique({ where: { id: params.id } });
// RIGHT: object fetch by ID + tenant/user scope
const order = await db.order.findFirst({
where: { id: params.id, tenantId: session.tenantId },
});
Copy-Paste Fix Prompt for Cursor/Claude
Audit my API for BOLA/IDOR vulnerabilities.
1. Enumerate all routes accepting IDs.
2. Flag lookups not constrained by authenticated tenant/user scope.
3. Patch all reads/writes with actor-to-object ownership checks.
4. Add negative tests where UUIDs from other tenants return 404/403.
Return code diffs + test cases only.
Run a free URL scan. If it finds issues, paid plans unlock the full report, exact AI fix prompts, PDF export, and deeper audit coverage.
About the author

I'm Samuel, known online as Mr. Ballaz. I build Ubserve, a security scanner for apps built with AI tools like Cursor, Bolt, Lovable, and Supabase. Before Ubserve, I did manual security audits by hand — checking auth, exposed keys, and RLS policies one by one. Ubserve is that manual audit, automated, running in under 60 seconds instead of days.
Related resources
How Ubserve Applies This in Real Scans
Ubserve treats What Is BOLA (IDOR) Vulnerability? as a production risk, not a theory term. Our runtime simulation maps this control to attacker paths in auth, data access, and API behavior, then returns fix-ready guidance tied to your stack. OWASP-style principles are used as the baseline, but we prioritize what is actually exploitable in your live flow.
Runtime exploit simulation + behavioral authorization checks.
Clear proof path showing where trust boundaries fail.
AI-ready fix prompts and implementation-level patch guidance.
FAQs
Is BOLA the same as IDOR?+
Why is BOLA common in AI-built apps?+
Is BOLA a type of broken access control?+
How do I test for BOLA myself, without a scanner?+
Want Ubserve to test this risk in your app?
Run a scan and get attacker-first validation, exploit evidence, and fix guidance mapped to what is bola (idor) vulnerability?.
