Authorization (AZ6)
Eduardo उस डेटा तक पहुँच सकता है जिसकी उसे अनुमति नहीं है, भले ही उसे फॉर्म/पृष्ठ/URL/प्रवेश बिंदु तक पहुँच की अनुमति हो
The key concept for this card is applying authorization controls at the data level. See Authorization 5 (AZ5) for resource types controls, and Authorization 7 (AZ7) for function/object/property controls.
Scenario: Eduardo's Unauthorized Data Access Within Authorized Areas
Visualize a situation where Eduardo, despite having legitimate access to a certain form, page, URL, or entry point within an application, is able to access data beyond his authorized permissions. This happens due to:
- Inadequate Granular Authorization Controls: The application does not enforce sufficient authorization checks at the data level, despite having controls at the page or form level.
- Access Control Oversights: The system fails to differentiate between the authorization for accessing a page and the authorization for accessing specific data on that page.
Example
Eduardo has legitimate access to a report generation page in a corporate application. However, the page’s backend logic does not adequately verify his permissions for each data set available through the report generator. Eduardo exploits this oversight to access confidential data sets from the report generation tool, which he should not have access to based on his user role.
Threat Modeling
STRIDE
This scenario maps primarily to STRIDE: Elevation of Privilege.
Elevation of Privilege (EoP) occurs when an attacker accesses resources or data beyond what their role or permissions allow. Eduardo has legitimate access to the page (entry point), but the backend does not enforce proper data-level authorization, allowing him to access confidential data he shouldn’t. The core issue is improper enforcement of authorization at the data level, enabling privilege escalation within the context of an allowed page. The consequence of such an action leads to Information Disclosure in most cases.
What can go wrong?
Such gaps in authorization controls can lead to unauthorized data access, potentially resulting in information leakage, privacy breaches, and compliance violations. This can manifest in various forms, including but not limited to:
- Insecure Direct Object References (IDOR)
- Broken Object Level Authorization (BOLA)
- Unauthorized access to sensitive data through legitimate entry points
For more things that can go wrong, see the Common Attack Patterns related to this card in the table below.
What are we going to do about it?
Even though a user may be permitted access to a particular page, the contents of that page should also verify access control privileges. For example, a user should be able to edit their own profile text, but not that for another user.
- Implement least privilege, and restrict users to only the data and system information that are required to perform their tasks.
- Implement granular authorization checks that not only control access to pages and forms but also verify user permissions for each data set or action available within these entry points.
- Regularly audit and update access control mechanisms to ensure they align with user roles and data sensitivity levels.
- Conduct thorough security testing to identify and address any potential authorization bypass scenarios.
- Ensure that data-specific access is restricted to users with explicit permissions to specific data items to mitigate insecure direct object reference (IDOR) and broken object level authorization (BOLA).
For detailed advice on how to mitigate threats related to the card, see the ASVS and OWASP Developer Guide requirements in the table below.
Mappings
OWASP ASVS (v5.0): 8.1.1,8.1.2,8.2.2,8.2.3,15.3.1,16.3.2
OWASP DevGuide: AC2,AC4,ACM6,ACM7,ACM8,DP4
STRIDE: Elevation of Privilege
CAPEC Map
| Code | Title | ASVS |
|---|---|---|
| 58 | Restful Privilege Elevation | 8.1.1,8.1.2,8.2.2,8.2.3,15.3.1,16.3.2 |
| 122 | Privilege Abuse | 8.1.1,8.1.2,8.2.2,8.2.3,15.3.1,16.3.2 |
ASVS (5.0) Cheat Sheet Series Index
No attacks registered!