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

Testing for BOLA Vulnerabilities

Systematic techniques for discovering object-level authorization flaws through ID manipulation and fuzzing.

Testing for BOLA Vulnerabilities

What you'll learn: How to systematically discover broken object-level authorization flaws by manipulating identifiers and fuzzing API endpoints.

What Is BOLA Testing?

Testing for BOLA (Broken Object-Level Authorization) means actively probing APIs to find places where you can access objects that don't belong to you. You've learned what BOLA is—now it's time to hunt for it systematically. Think of it like checking every door in a hotel to see if your keycard opens rooms it shouldn't.

Core Testing Techniques

ID Manipulation is your primary weapon. When an API returns or accepts an object identifier (user ID, order number, document reference), try replacing it with values belonging to other users:

GET /api/users/1234/profile    # Your profile
GET /api/users/1235/profile    # Try next sequential ID
GET /api/users/9999/profile    # Try different ID

Sequential ID Fuzzing involves incrementing or decrementing IDs to discover accessible objects. Many systems use predictable identifiers, making this straightforward.

GUID Testing works even with random-looking IDs. Collect GUIDs from different contexts (public pages, emails, shared links) and test them in authenticated endpoints.

Systematic Approach

  1. Enumerate endpoints that accept object identifiers
  2. Create test accounts to generate valid IDs from different user perspectives
  3. Capture legitimate requests using User A's credentials
  4. Replay with User B's tokens but keeping User A's object IDs
  5. Monitor responses for successful unauthorized access

Test across different HTTP methods—a GET might be protected while PUT or DELETE aren't.

Key Takeaway: Testing for BOLA requires systematically replacing object identifiers in API requests while authenticated as different users, checking whether authorization is properly enforced at the object level rather than just the endpoint level.