Secure Legion Labs
Broken Access Control Lab
This challenge simulates a portal that trusts object identifiers coming from the request. The application shows account data based only on the object ID, without verifying whether the logged-in user should actually see it.
The page reads an ?account= value and uses it to fetch a record. The current session belongs to one user, but the request handler does not restrict which object ID can be loaded.
1001?account=1001Confirm unauthorized object accessThe app checks whether a record exists and then renders it. The broken step is that it never verifies whether the logged-in user actually owns that record before returning the data.
record = accounts[accountId]
if (record) { return record }
// missing ownership validationUse the internal console to request different account objects and watch how the portal responds.
GET /api/account?account={ "status": "idle" }The portal renders account information whenever a matching record exists. The bug is that it trusts the object reference instead of validating access rights.
Status: waiting for a record request.
The flag appears after you access a record outside the current user's account scope.
Submit the exact unlocked flag to finish the IDOR room.
Flag is locked until you access an unauthorized record.
The application takes an account identifier directly from the request.
The backend finds the object and prepares it for rendering.
No ownership validation runs before the response is shown to the user.