Broken Authorization
BOLA and access flaws.
Broken Authorization is a free Cyber Security Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cyber Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Authentication vs Authorization
Authentication proves who you are. Authorization decides what you are allowed to do.
Broken authorization means the system lets users do or see things they should not.
What Is BOLA
BOLA stands for Broken Object Level Authorization.
It is the top API risk: an API checks that you are logged in, but not that the specific object you ask for actually belongs to you.
A BOLA Example
Imagine your account is user 100.
GET /api/users/100/ordersIf you change the ID and the server still responds, you just read someone else's orders. That is BOLA.
Why BOLA Happens
Developers often trust the ID in the request.
They forget to verify the logged-in user actually owns that object. The fix is an ownership check on every request.
Function Level Authorization
Another flaw is BFLA: Broken Function Level Authorization.
A normal user calls an admin-only action and it works, because the endpoint never checks the user's role.
A BFLA Example
Consider an admin route:
DELETE /api/admin/users/55If a regular user can call it successfully, the API failed to enforce role-based access.
Mass Assignment
Some APIs blindly map request fields onto a record.
A user could add a field like role=admin to a profile update and quietly escalate their own privileges.
Check on the Server
Never rely on the client to hide buttons or fields.
The server must enforce every authorization decision, because attackers send requests directly, bypassing your UI entirely.
Use Unpredictable IDs
Sequential IDs make BOLA easy to exploit.
Using random identifiers like a UUID does not replace authorization checks, but it removes the simple guess-the-next-number attack.
Default Deny
A safe API denies by default.
Access is allowed only when an explicit rule grants it. This way, a forgotten check fails closed rather than leaking data.
Test Authorization
Authorization bugs hide easily, so test them on purpose.
Try accessing another user's data with your own token. If it works, you have found a serious flaw to fix.
Quick Check
An API confirms you are logged in but returns another user's record when you change the ID. What flaw is this?
Recap
Broken authorization lets users access what they should not. Watch for BOLA, BFLA, and mass assignment.
Enforce ownership and role checks on the server, deny by default, and test authorization deliberately.
Frequently asked questions
Is the “Broken Authorization” lesson free?
Yes — the full text of “Broken Authorization” is free to read here on the web, and the Cyber Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cyber Security Academy course, upgrade to CoddyKit PRO.
What will I learn in “Broken Authorization”?
BOLA and access flaws. You practise Cyber Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cyber Security Academy?
No prior experience is required. Cyber Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Broken Authorization” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cyber Security Academy lesson?
Yes. Every Cyber Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- API Attack Surface
- Broken Authorization
- Rate Limiting and Abuse
- Securing API Keys