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:
| Axis | Restricts | Failure is called |
|---|---|---|
| Vertical | functions by user type (admin vs user) | vertical privilege escalation, Function Level Authorization failure |
| Horizontal | resources by owner | Insecure Direct Object Reference / BOLA in APIs |
| Context-dependent | actions 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:
| Pattern | Test |
|---|---|
| Unprotected functionality | browse /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 enforcement | hidden button / USER_SIGNUP:false JS flag while /signup or /auth/v1/signup still works server-side |
| Platform rule bypass | X-Original-URL, method swap, /ADMIN/DELETEUSER, /admin/deleteUser.anything, trailing slash; see Header-Based Access Control Bypass |
| Multi-step gap | steps 1–2 checked, step 3 (confirm) not; replay step 3 directly |
| Referer-based | sub-pages trust Referer: https://site/admin |
| Leaky denial | 302 to login still carries the victim’s data in the body |
| Lifecycle / revocation | removed 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 search | wildcard/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 called | detail/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 ignored | hidden, 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 leak | object 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_editpermission check; server returned200 OKand persisted the change. - B2B credit system (Wiz Red Agent): a single client-controlled boolean
unmaskContactDatalet free-tier users unlock millions of paywalled contact records, a monetization control living in the client. - Hiding a signup button: frontend flag
USER_SIGNUP: falsebut 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_schemaexposed 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
ifblocks. - 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.
Related
- Authorization Security
- Function Level Authorization
- Privilege Escalation
- Multi-Tenant Isolation
- Header-Based Access Control Bypass
- Insecure Direct Object Reference
- BOLA in APIs
- GraphQL Authorization Flaws
- Mass Assignment
- OWASP API Security Top 10
- Authorization Testing Automation
Sources
- OWASP Top 10 2025 — A01 Broken Access Control · original
- What Changed in OWASP Top 10 2025? Full Breakdown & Recommendations · original
- Why Broken Access Control Dominates OWASP Top 10 in 2026 · original
- Access Control Vulnerabilities and Privilege Escalation - PortSwigger · original
- Authorization Cheat Sheet - OWASP · original
- Broken Access Control - Vertical Privilege Escalation Writeup · original
- How To Find Broken Access Control Vulnerabilities in the Wild - HackerOne · original
- Preventing broken access control in express Node.js applications · original
- Hiding a Signup Button Isn’t Security: From Client-Side Controls to Cross-Tenant Data Exposure · original
- The User Was Removed. The Access Wasn’t. · original
- Soft-Deleted, Still Editable: BOLA in Munshi’s Invoice API · original
- Zero Credentials, Full Access: Inside a Complete Authorization Failure · original
- The Red Agent POV: The One Boolean That Broke a B2B Platform’s Credit System · original
- ERPNext's Document Follow feature exposed unauthorized data · original
- The $0 IDOR that was worth more than a $12,500 P1: business logic matters · original
- Hacking Kia: Remotely Controlling Cars With Just a License Plate · original
- Delete anyone's Snapchat Spotlight content remotely ($15,000 IDOR via GraphQL mutation) · original
- Post IDOR: hidden posts readable by ID, listing filter bypass · original
- The Wildcard Parameter That Exposed 60 Million USPS Accounts · original
- Laravel Authorization: The Data Leaks Your Policies Never See · original
- Bolt: information disclosure through unfiltered public relation API endpoint · original
- ArcadeDB authorization bypass (GraphQL) · original
- One Checkbox Too Many: How a Contacts Permission Turned Into Admin Access · original