Broken Access Control

The application authenticates the caller correctly but fails to enforce what that caller may do or see: OWASP A01 in both 2021 and 2025, and a logic flaw scanners can’t see because the bug is a missing check, not a malformed input.

How it works

Access control depends on authentication (who you are) and session management (which requests are yours), but is a separate decision: is this principal allowed this action on this object in this state. PortSwigger splits the controls into three axes, and nearly every bug breaks one of them:

AxisRestrictsFailure is called
Verticalfunctions by user type (admin vs user)vertical privilege escalation, Function Level Authorization failure
Horizontalresources by ownerInsecure Direct Object Reference / BOLA in APIs
Context-dependentactions by workflow state (no cart edits after payment)multi-step / lifecycle bypass

Why it stays #1:

  • OWASP 2025 data: 100% of tested apps had some form of BAC; 40 CWEs mapped, max incidence 20.15%, avg 3.74%, 1,839,701 occurrences, 32,654 CVEs. The 2025 category absorbs CWE-918 (SSRF) and CWE-352 (CSRF) alongside CWE-862/863/639/200.
  • Semantic gap: SAST understands code structure but not business intent, so a missing ownership check is invisible to signature-based tools. Auth0 frames BAC/BOLA as “logical” versus “technical” (SQLi/XSS) vulnerabilities.
  • Check sprawl: authorization is imperative code repeated per route, resolver, worker and export. One missed WHERE tenant_id = ? leaks data, and AI coding agents repeat the omission at scale (see Multi-Tenant Isolation).

Techniques / payloads

Root-cause families, with the request shape that exposes each:

PatternTest
Unprotected functionalitybrowse /admin, /administrator-panel-yb556; URLs leak via robots.txt or role-gated JS shipped to everyone (var isAdmin=false; if(isAdmin){...href='/administrator-panel-yb556'})
Client-controlled role/entitlement?admin=true, ?role=1, hidden field, cookie Admin=false, body flag unmaskContactData=true, roleid in profile update
UI-only enforcementhidden button / USER_SIGNUP:false JS flag while /signup or /auth/v1/signup still works server-side
Platform rule bypassX-Original-URL, method swap, /ADMIN/DELETEUSER, /admin/deleteUser.anything, trailing slash; see Header-Based Access Control Bypass
Multi-step gapsteps 1–2 checked, step 3 (confirm) not; replay step 3 directly
Referer-basedsub-pages trust Referer: https://site/admin
Leaky denial302 to login still carries the victim’s data in the body
Lifecycle / revocationremoved member still calls GET /api/page/{pageId}/info with a retained ID; soft-deleted invoice (is_deleted=1) still accepts PUT /api/invoice/{id}/extracted-data
Unscoped searchwildcard/match-all term in a “find my records” API returns every account (USPS) ([[raw/medium.com/the-wildcard-parameter-that-exposed-60-million-usps-accounts-15889
Policy never calleddetail/update route uses the policy; CSV export, search, included relations or a queued report job don’t ([[raw/hcanovas.medium.com/laravel-authorization-the-data-leaks-your-policies-never-see-15928
Object state ignoredhidden, comments-disabled, blocked-user and deleted states enforced in listings only, not on per-object read/comment/react endpoints ([[raw/community.protocall.ch/post-idor-hidden-posts-readable-by-id-listing-filter-bypass-15812
Field-level leakobject check passes but a related field or notification carries data (ERPNext Document Follow)

Testing approach that finds these consistently: build a permissions map (roles × actions), then replay each privileged request with every lower-privileged session and with none (HackerOne’s method; automated in Authorization Testing Automation).

Notable cases

  • ERPNext Document Follow (CVE-2026-66000/66058/66059): three stacked failures: any user could follow any document (object-level), update emails leaked fields (field-level), and notifications continued after permission revocation.
  • “The User Was Removed. The Access Wasn’t.”: an undocumented-in-UI endpoint from API docs returned private page metadata and member emails/permission levels to a user whose access had been revoked, because it only validated the JWT and the retained pageId.
  • Munshi invoice API: soft-deleted invoices remained writable, with no ownership, role, or invoice_edit permission check; server returned 200 OK and persisted the change.
  • B2B credit system (Wiz Red Agent): a single client-controlled boolean unmaskContactData let free-tier users unlock millions of paywalled contact records, a monetization control living in the client.
  • Hiding a signup button: frontend flag USER_SIGNUP: false but the signup endpoint stayed live, leading to cross-tenant data exposure.
  • Zero-credential SaaS API: unauthenticated access to premium features, user impersonation and private conversations via client-controlled metadata and exposed API docs.
  • Kia (Sam Curry): registering as a dealer in the dealer portal minted tokens that controlled arbitrary vehicles from a license plate, a pure authorization failure on who may act on which VIN.
  • USPS Informed Visibility (~60M accounts): no check that results belonged to the caller; Nicholas Weaver called it the absence of the most basic rule rather than a subtle lapse; fixed only after Krebs’s 48-hour public pressure, over a year after the report (writeup).
  • Snapchat Spotlight: GraphQL mutation deleted any user’s Spotlight content, $15,000.
  • Metadata paths that skip the data ACL: Bolt < 6.1.4 (CVE-2026-77379) public Relation API (REST and GraphQL) returned metadata of unpublished, draft and viewless content to unauthenticated users (Bolt); ArcadeDB < 26.11.1 (CVE-2026-134327) listings ignored per-type ACLs, so the PostgreSQL wire catalog, GraphQL introspection and MCP get_schema exposed denied types’ properties, indexes and materialized-view SQL (ArcadeDB). Relation, listing, schema and search endpoints need the same filter as the object endpoint.
  • $12,500 P1 from a “$0” IDOR: impact came from chaining access-control oversights into workflow takeover and framing it as financial loss.
  • A sub-account limited to “View & Manage Contacts” could edit its own permissions to admin-equivalent through the normal UI, with no admin notification. (source)

Defenses

OWASP Authorization Cheat Sheet, condensed:

  • Deny by default; require developers to declare allowed access per resource.
  • Validate on every request, server-side, in one application-wide mechanism (filter/middleware/decorator), not per-controller ad hoc if blocks.
  • Prefer ABAC/ReBAC over RBAC for object-level rules (see Access Control Models); externalize via PDP/PEP and policy-as-code (Authorization Policy Engines).
  • Lookup IDs must be safe even when guessed; randomized IDs are obscurity, not control.
  • Enforce authz on static resources and cloud storage too.
  • Handle lifecycle: revocation, deletion and role change must invalidate derived access (sessions, follows, share links, cached tokens).
  • Exit safely on failure (no data in the error/redirect body), log denials, and write unit/integration tests per role × endpoint.
  • Push tenant scoping into the data layer where possible (Postgres RLS; see Multi-Tenant Isolation).

Express-specific anti-patterns Snyk calls out: unprotected /admin routes, ?isAdmin=true gates, and obscured route names.

Sources