Broken Access Control
A category of vulnerabilities where restrictions on authenticated users are not properly enforced, allowing access to unauthorized functions or data.
Broken Access Control is a broad category of vulnerabilities where restrictions on what authenticated users are allowed to do are not properly enforced. This is consistently ranked as a top security risk in the OWASP Top 10.
Common Manifestations
- Bypassing access control checks by modifying URLs or parameters
- Allowing users to act as other users or administrators
- Accessing APIs without proper authentication
- Privilege escalation (horizontal or vertical)
- Metadata manipulation (JWT, cookies, hidden fields)
- CORS misconfiguration allowing unauthorized access
Prevention
- Implement access control centrally and consistently
- Deny by default except for public resources
- Log access control failures and alert on repeated attempts
- Rate limit API access to minimize automated attacks
- Invalidate JWT tokens on logout (server-side)
- Minimize CORS usage and be restrictive
- Record ownership and enforce it in every query
Testing Approach
- Test every endpoint with different user roles
- Try accessing resources owned by other users
- Test for parameter manipulation
- Verify role checks are server-side, not client-only