In the 2021 revision of the OWASP Top 10, Broken Access Control climbed to the number-one spot, moving up from fifth place and displacing injection. OWASP's page reports that it tested 94% of applications for some form of broken access control, with an average incidence rate of 3.81%. It is the flaw of a system that knows who you are and forgets to ask what you are allowed to do.

Access control enforces the boundary between what a user can do and what they should be able to do. When that boundary fails, an authenticated user acts outside their intended permissions, reading other people's records, editing data they do not own, or reaching administrative functions never meant for them. The cause is rarely exotic: a check that was omitted, applied in the wrong place, or left to the client.

What it looks like in practice

Broken Access Control: The Flaw That Now Tops the OWASP ListDiagram with these labels, in reading order: AUTHENTICATED USER; WEB APP; BACKEND / DB; as a normal user; should be enforced; check omitted; allow if owner; Authenticated user; Alters id / forces; URL; account=124,; /admin/…; Access control; Ownership / role; check; Another user's; record; / admin function; Check lives in the; UI, not enforced; server-side.AUTHENTICATED USERWEB APPBACKEND / DBas a normal usershould be enforcedcheck omittedallow if ownerAuthenticated userAlters id / forcesURLaccount=124,/admin/…Access controlOwnership / rolecheckAnother user'srecord/ admin functionCheck lives in theUI, not enforcedserver-side
The server knows who you are and forgets to ask what you may do.

The classic form is the insecure direct object reference (IDOR): an endpoint accepts an object identifier and returns the object without confirming the caller owns it. Change account=123 to account=124 and read a stranger's statement. Related failures include privilege escalation (acting as an administrator by manipulating a role field or forcing your way to an admin URL) and metadata tampering, where a token or cookie is replayed or altered to grant rights it should not carry.

Forced browsing to a function that lacks a server-side checkGET /app/dashboard → 200 OK (normal user)
GET /app/admin/deleteUser?id=42 → 200 OK (no role check)

A large share of these flaws come from a single assumption: that because the UI never shows a control to a normal user, the server never needs to defend it. Attackers do not use your UI. They call your endpoints directly, and any authorization decision made only in the browser is no decision at all.

Why it is A01: Access control leads the 2021 list, and the 2025 edition keeps it at A01. A single missing check can expose or corrupt every record in a multi-tenant system.

Getting it right

  • Deny by default. Every resource except explicitly public ones should reject access unless a rule grants it. Fail closed, not open.
  • Enforce on the server, on every request. Re-verify authorization for each object and each function server-side. The client's view of what a user may do is a convenience and never a control.
  • Centralise the mechanism. Route access decisions through one shared component rather than scattering per-endpoint checks a developer can forget on the next handler.
  • Derive scope from the session. Where you can, query by the authenticated principal (WHERE owner_id = :me) instead of accepting an arbitrary ID and checking afterward.
  • Log failures and rate-limit. Repeated access-denied events are a probing signal; alert on them and slow down enumeration.
  • Test authorization continuously. Replay one user's requests with another user's token in automated tests to catch regressions before they ship.

Broken access control is largely a discipline problem. The individual fix, such as an ownership check or a role gate, is simple; the difficulty is applying it without exception across an application that keeps growing new endpoints. That rule erodes silently, and you cannot defend an attack surface you have never fully inventoried.

Primary source. A01 Broken Access Control - OWASP Top 10:2021, OWASP Top 10 Team, OWASP Foundation.

Back to the knowledge baseRequest an assessment