Pcornel
Security · OWASP

Broken Access Control

Cheat sheet · https://pcornel.dk/topic.php?topic=4767

Back to the Topic

Answer

Broken access control (OWASP A01) lets users act outside their permissions, such as viewing others' records by changing an ID in the URL. Enforce authorization server-side on every request and deny by default.

Remember

  • Check authorization on every request server-side.
  • Changing an ID in a URL must not reveal other data.
  • Deny by default.

First checks

  • Authorisation tests (IDOR, forced browsing) — access control
  • curl -H 'Authorization: Bearer <userA>' https://<api>/users/<userB-id> — IDOR test
  • Server-side checks on every request — deny by default

Verify in this order

request → server-side authorisation → allow/deny

Where it usually breaks

First mismatch in asset/subject identity → trust/authentication → authorization/policy → enforcement/control → telemetry/detection → protected outcome/response; preserve identity/policy/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4767

Confirmation

Confirm action

Continue?