← All Labs
🛡 AUTH BEGINNER +100 XP · +40 no-hint bonus

A01 Broken Access Control – Role in a Cookie

The portal hides its administrator navigation but stores the user's role in a browser cookie. Test whether the server trusts this client-controlled value.

https://a01-broken-access-control-role-in-a-cookie.lab.local/

What is Broken Access Control – Client-Controlled Role Cookie?

Cookies are controlled by the browser and can be modified by users. An application must not treat an unsigned role value in a cookie as proof of privilege. Authorization must come from trusted server-side session state.

About this lab

Designed by the SecurityElites team specially for training.

How AI helps you find it

AI can explain the relevant HTTP behaviour, suggest a focused test checklist and help compare expected and observed responses. Confirm findings manually.

How to fix it

  • Store role assignments in trusted server-side session state.
  • Use protected session identifiers; do not trust unsigned role values.
  • Enforce authorization on every privileged request.
  • Deny access by default and apply least privilege.
  • Test cookie tampering and privilege escalation.
  • Log suspicious role changes.

How AI helps you defend against it

AI can help review the relevant route, input handling or configuration and draft regression tests. A developer must validate the implementation.

Read the full OWASP LLM Top 10 guide · All free labs · AI red team certification