Skip to main content
XsiSec.com
HomeReposBlogProjectsPortfolio
© 2026 XsiSec.com
Security rules |security.txt
Updated 2026-08-15 · v1.0.0+2026-08-14.82f92cb · 82f92cb
← Back to overview
Security article

User role controlled by request parameter

User role controlled by request parameter: This lab has an admin panel at /admin, which identifies administrators using a forgeable cookie. • PortSwigger • Access-control, SQL Injection • access-control, portswigger

2023-04-214 tags
Tags

🎯 Objective

This lab has an admin panel at /admin, which identifies administrators using a forgeable cookie.

Goal:

  • Modify the cookie to gain admin access.
  • Use the admin panel to delete the user carlos.

📝 Provided Information

  • Credentials:
    text
    wiener:peter

🔎 Analysis

Step 1: Login as Wiener

Logged in using the provided credentials and inspected parameters sent to the server:

Session Capture


Step 2: Inspect the Cookie

Noticed the following cookie:

http
Cookie: session=kQ9RdeA6ycyGdQDmgqZgYxt7wOlWSLPk; Admin=false

The Admin=false flag looked suspicious.


Step 3: Modify the Cookie

Changed the value to:

http
Cookie: session=kQ9RdeA6ycyGdQDmgqZgYxt7wOlWSLPk; Admin=true

Now the server exposed a new route: /admin

Admin Link Found


Step 4: Persist the Value

Updated local session storage in the browser to always append the parameter as true:

Local Storage Update


Step 5: Access the Admin Panel

Navigated to /admin:

Admin Access

Gained full access to the admin panel.


🎉 Result

  • Successfully forged the Admin=true cookie.
  • Accessed the admin panel.
  • Deleted the user carlos. ✅

💡 Key Takeaway

Always review parameters sent to the server.
Seemingly minor flags like Admin=false may directly control access levels.
In this case, flipping it to true granted administrative privileges.

Navigate

In this post

  1. 01🎯 Objective
  2. 02📝 Provided Information
  3. 03🔎 Analysis
  4. 04Step 1: Login as Wiener
  5. 05Step 2: Inspect the Cookie
  6. 06Step 3: Modify the Cookie
  7. 07Step 4: Persist the Value
  8. 08Step 5: Access the Admin Panel
  9. 09🎉 Result
  10. 10💡 Key Takeaway
Search
Explore

Popular tags

Browse all 30 tags

Comments

0 comments

No comments yet — be the first to comment.