Secure Legion Labs
Broken Authentication Lab
This room simulates a support login portal with a flawed recovery flow. The normal password check exists, but the fallback reset-token logic trusts any valid temporary token without confirming that the token belongs to the requested user.
The portal accepts a username, password, and a temporary recovery token. A normal user can log in with their real password, but the challenge is to abuse the flawed recovery logic to reach the admin account.
adminwrong or unknownTEMP-*The temporary token branch only checks whether a token is valid somewhere in the system. It never verifies that the token belongs to the same username the attacker is trying to log into.
if (user.password === password) { login(user) }
else if (validResetToken(token)) { login(user) }
// missing token.userId === user.idTry normal credentials first, then pivot into the fallback token flow and see what the portal allows.
POST /api/login{ "status": "idle" }The portal shows whichever dashboard the flawed authentication logic allows through. The win condition is unauthorized access to the admin view.
Status: waiting for a login request.
The flag appears once the bypass reaches the admin dashboard without using the admin password.
Submit the unlocked flag to complete the login bypass room.
Flag is locked until you reach the admin dashboard through the flawed auth path.
The portal accepts a username, password, and optional recovery token.
The attacker does not need the correct admin password if the fallback path is weaker.
A valid token from another account still logs in the requested user because ownership is never checked.