API5:2023 - Broken Function Level Authorization
What you'll learn: How attackers exploit missing authorization checks to access admin or privileged API functions they shouldn't be able to reach.
The Core Problem
Broken Function Level Authorization occurs when an API fails to verify whether a user has permission to call a specific function, especially administrative or privileged ones. Unlike BOLA (which checks if you can access specific objects), this vulnerability lets users execute actions they shouldn't be allowed to perform at all.
Think of it like a hotel: BOLA is about whether you can open room 302 versus room 303. Broken Function Level Authorization is about whether a guest can access the maintenance panel that controls the entire building's heating system—a function that should be staff-only.
Common Vulnerability Patterns
Hidden endpoints: Administrative functions exist at predictable URLs like /api/admin/deleteUser but lack proper checks. An attacker simply guesses or discovers these endpoints and calls them directly.
HTTP method confusion: A GET /api/users might be public, but DELETE /api/users/{id} exists without verifying the caller is an admin.
Role checks on client-side only: The UI hides admin buttons, but the API endpoint itself performs no server-side authorization validation.
Real-World Example
A regular user discovers /api/v1/reports/generate is publicly documented. They try /api/v1/admin/reports/deleteAll by guessing, and the API executes it without checking if they're an administrator—wiping all company reports.
Prevention
Every sensitive function must verify the user's role or permissions on the server side before execution. Never rely on UI hiding or client-side checks alone.
Key Takeaway: Always implement server-side authorization checks for every API function, especially administrative operations—assume attackers know your endpoint structure and will try privileged functions directly.