For the complete documentation index, see llms.txt. This page is also available as Markdown.

Access Control Vulnerabilities

Access Control Vulnerabilities - Overview

1. What access control actually is

  • Sits after authentication + session management in the chain:

    • Authentication - are you who you say you are

    • Session management - which requests belong to that same "you"

    • Access control - are you allowed to do this specific thing

  • Broken access control = common, and usually critical when found

  • Root cause is mostly human: access rules are business decisions translated into code, and humans get that translation wrong a lot

2. Three types of access control

  • Vertical - different user types get different functions (admin vs regular user)

  • Horizontal - same user type, but restricted to their own subset of resources (your bank transactions, not someone else's)

  • Context-dependent - restricted based on app state/sequence (can't edit your cart after payment)

3. Vertical privilege escalation

Unprotected functionality

  • Sensitive URL just... isn't checked (/admin reachable by anyone who knows/guesses it)

  • "Hiding" it with an unguessable URL isn't access control - check:

Parameter-based access control

  • Role/privilege decided at login, then stored somewhere the client can touch: hidden field, cookie, query string

  • Example: ?admin=true, ?role=1

  • If it's client-controlled, just change it

Platform misconfiguration

  • Access rule enforced at platform/proxy layer, tied to a specific URL + method, e.g. DENY: POST /admin/deleteUser for managers

  • Bypass angles:

URL-matching discrepancies

  • Front-end control and back-end routing disagree on what counts as "the same" URL

  • Angles to test:

4. Horizontal privilege escalation

  • Same mechanics as vertical, different target: ?id=123 → change to another user's ID

  • This is IDOR (insecure direct object reference) - object/user identified directly by user-controlled input, no ownership check

  • If the ID is a GUID instead of an incrementing number, it's harder to guess directly - but:

  • Watch for partial leaks: even if the app redirects you to login when access is denied, check if the redirect response body still contains the target's sensitive data anyway

5. Horizontal → Vertical escalation

  • Compromising any other user's account can become vertical escalation if that user turns out to be privileged

  • Same ?id= tampering trick, just aimed at an admin account instead of a random user

  • Once in: reset/read their password, or use their session directly for privileged actions

6. Multi-step process flaws

  • Sensitive action split across steps (load form → submit changes → review/confirm)

  • Bug: access control only checked on steps 1-2, not step 3

  • Attack: skip straight to submitting step 3's request with the right parameters, bypassing whatever gate was on steps 1-2

7. Referer-header-based access control

  • Main page (/admin) properly protected, sub-pages (/admin/deleteUser) only check that Referer contains /admin

  • Referer is fully attacker-controlled → forge it, hit the sub-page directly, bypass entirely

8. Location-based access control

  • Restriction based on geolocation (banking, media licensing, etc.)

  • Bypassed with VPNs, proxies, or just spoofing client-side geolocation values

9. Testing checklist

10. Prevention (useful context for writeups)

  • Never rely on obscurity (hidden URLs, unlisted endpoints) as the actual control

  • Deny by default - only allow what's explicitly meant to be public

  • One consistent, application-wide enforcement mechanism, not scattered per-endpoint checks

  • Require developers to explicitly declare access rules per resource, default-deny otherwise

  • Actually test access controls - don't assume the design holds up in code

Last updated