Security Glossary

What Is BOLA (IDOR) Vulnerability?

March 28, 2026Last Updated: August 13, 20262 min read
Focus
BOLA
Risk
High
Stack
Supabase/Next.js
Detection
Ubserve Runtime Simulation
Dark security wireframe showing object ID request paths and authorization checks.

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
Scan my app free

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 routesGET /api/orders/:id that looks up by ID alone, with no WHERE tenant_id = session.tenantId clause.
  • Next.js Server Actions — mutations that accept a projectId from 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

Samuel, Founder & maker of Ubserve
Samuel
Founder & maker of Ubserve

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.

Detection

Runtime exploit simulation + behavioral authorization checks.

Evidence

Clear proof path showing where trust boundaries fail.

Remediation

AI-ready fix prompts and implementation-level patch guidance.

FAQs

Is BOLA the same as IDOR?+
Yes in practice. IDOR (Insecure Direct Object Reference) is the older, OWASP Top 10 2017-era name; BOLA (Broken Object Level Authorization) is the modern API-security term used in the OWASP API Security Top 10. Same underlying flaw.
Why is BOLA common in AI-built apps?+
Generated routes often validate authentication but skip object-level ownership validation — the code checks that you're logged in, not that you own the specific record you're asking for.
Is BOLA a type of broken access control?+
Yes — BOLA is the single most common manifestation of the broader OWASP category. See our full breakdown of broken access control in AI-built apps for the other three ways this failure shows up.
How do I test for BOLA myself, without a scanner?+
Create two test accounts. Log in as account A, note an object ID (an order, project, or invoice ID). Log in as account B, and request that same ID directly through the API or URL. If you get account A's data back, that endpoint has a BOLA vulnerability.
Glossary to action

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?.