Course contentsShow
← Security
Lesson 1019 of 3,05221. Web Security - API SecurityFree lesson

Broken Function-Level Authorization

Exploiting missing authorization checks on API endpoints that should require elevated privileges.

Broken Function-Level Authorization

What you'll learn: How attackers exploit missing authorization checks on API endpoints that should require elevated privileges like admin or manager roles.

The Concept

Broken Function-Level Authorization occurs when an API endpoint fails to verify whether the authenticated user actually has the privilege level required to perform a specific function. Unlike Broken Object-Level Authorization (BOLA), which deals with accessing specific resources, this flaw is about accessing administrative or privileged functions themselves.

Think of it like a hotel: BOLA is sneaking into someone else's room, while Broken Function-Level Authorization is a regular guest walking into the manager's office and successfully using the master control panel because nobody checked if they're actually a manager.

How It Works

An attacker discovers API endpoints meant for privileged users (admins, moderators, managers) through:

  • API documentation or exposed specifications
  • Predictable URL patterns (e.g., /api/admin/deleteUser)
  • Client-side code inspection revealing hidden endpoints

Even though the attacker is authenticated as a regular user, if the endpoint doesn't verify their role or permission level, they can execute privileged operations like:

  • Deleting other users
  • Modifying system settings
  • Accessing administrative dashboards
  • Promoting themselves to admin
  • Viewing sensitive reports

The Danger

This vulnerability allows privilege escalation attacks where low-privilege users perform high-privilege actions. The API assumes that "if you can reach this endpoint, you must be authorized," which is a dangerous assumption when endpoints are discoverable.

Key Takeaway: Always implement server-side authorization checks on every function that requires elevated privileges—never rely on hiding endpoints or client-side controls alone.