BOLA
Last updated
Was this helpful?
Last updated
Was this helpful?
This can lead to unauthorized access to sensitive data or actions, as attackers can exploit insufficient authorization checks to view or modify other users' data or resources.
Implement robust server-side authorization checks, ensure that access controls are enforced for every request, and avoid exposing direct references to sensitive objects in user inputs.
Testing for BOLA involves:
Identifying relevant requests, i.e., requests that have resources IDs and/or that access other resources.
Perform A-B testing:
Create and make requests as userA
.
Create userB
and repeat the requests to userA
's resources using userB
's token.
The below example is based on the crAPI application.
The below example shows how A/B testing works:
Two users are created: userA
and userB
(Figure 1).
We have uploaded a video on userB
's profile as well as booked a vehicle.
We request the video and car's details with userB
's token and we save these requests.
We then replace userB
's with userA
's token and trying to access the same information (Figure 2).
We are unable to access the video information (Figure 3), but we are able to access the car's information (Figure 4). The latter is considered a BOLA flaw.
userA
).userA
's token.userB
's video with userA
's token.userB
's vehicle details with userA
's token.