Authorization disclaimer. This walkthrough is exclusively for the intentionally vulnerable PortSwigger Web Security Academy lab linked below. Only test systems you own or are explicitly authorized to assess.
Overview
This lab moves from missing controls to a broken control: the server decides whether a user is an administrator from the browser-controlled Admin cookie.

Lab objective/setup
Sign in with the synthetic credentials wiener:peter, obtain admin access, and delete carlos.
What I observed
Direct access to /admin was denied. After login, an intercepted request contained Admin=false, indicating that a security decision might depend on mutable client data.


Why it is vulnerable
Cookies are user input. Unless a value is integrity-protected and tied to authoritative server-side state, the server cannot trust it to grant privileges. Here, changing one Boolean alters authorization.
Walkthrough in the authorized PortSwigger lab
- Log in as
wienerand intercept an authenticated request. - Change
Admin=falsetoAdmin=truewithin the lab session. - Request
/admin, then deletecarlosusing the lab interface.




Verification
The panel becomes available only after modifying the cookie, and the Academy reports the lab solved after deletion. These observations isolate the trusted role flag as the failure.
Impact and defensive lesson
This pattern enables vertical privilege escalation. Store roles in server-side session state or derive them from an authoritative identity store, and authorize every sensitive endpoint.