Authorization & Access Control
Authorization & Access Control vulnerabilities at a glance
Overview
Authorization ensures users can only access the data and actions allowed by their role or identity. Failures to correctly control access can allow the wrong users to access different resources.
A correct design reads identity from a verified session or token, scopes ORM queries to that identity, and enforces access consistently at a shared policy layer.
Where it occurs
Common root causes include unscoped ORM queries, unprotected routes missing auth middleware, insufficient validated in resource fetches, and misuse of user identifiers from request bodies.
Impact
Authorization failures lead to data exposure across users or tenants, potential privilege escalation (horizontal or vertical), and financial loss or compliance violations.
Prevention
The exact prevention method will vary for each vulnerability, but generally you need to ensure you correctly know who the user is and have correctly scoped permissions to different resources.
Specific Vulnerabilities
Explore specific vulnerability types within this category:
Detect These Vulnerabilities in Your Code
Sourcery automatically identifies authorization & access control and related vulnerabilities in your codebase.
Scan Your Code for Free