Bitzu

CPSA ยท Web application assessment: recon, access control and input

Authorisation mechanism pitfalls

Insecure direct object references, forced browsing to privileged functions, role checks on the client.

Key points

  • Insecure direct object references (IDOR): a request names an object by ID and the server never checks this user may access it.
  • Forced browsing: opening a privileged URL directly because the link was only hidden.
  • Client-side role checks (hidden menus, an isAdmin flag in the browser): cosmetic.
  • Fix: server-side, per-object and per-function checks on every request, lookups scoped to the current user.

Source: https://cheatsheetseries.owasp.org/cheatsheets/Insecure_Direct_Object_Reference_Prevention_Cheat_Sheet.html

Practice questions

Single choice

What is missing in an insecure direct object reference?

  1. Transport encryption of the ID
  2. A server-side check that the user may access that specific object
  3. A CAPTCHA on the page
  4. A rate limit on the endpoint
Show answer

Answer: B. A server-side check that the user may access that specific object

IDOR is a missing object-level authorisation check: the object and its ID exist, but the server does not verify the requester's right to it. Encryption, rate limits or CAPTCHA do not supply that check.

Select all that apply

Which measures help prevent IDOR?

  1. Check authorisation for each object on the server
  2. Base64-encode the identifiers
  3. Scope database lookups to the current user's own objects
  4. Hide the link in the user interface
  5. Take the user identity from the session, not from a request parameter
Show answer

Answer: A. Check authorisation for each object on the server, C. Scope database lookups to the current user's own objects, E. Take the user identity from the session, not from a request parameter

Per-object server-side checks, queries scoped to the current user and deriving identity from the session are real controls. Base64-encoding IDs and hiding links in the UI only obscure the problem.

True or false

True or false: using random UUIDs as object identifiers removes the need for authorisation checks.

Show answer

Answer: False

False. Unpredictable IDs make guessing harder, but anyone who obtains a valid one (from a link, log or shared URL) still needs to be blocked by a server-side check.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More CPSA topics in this module